Attention convolution padding correction for TF "SAME"

This commit is contained in:
Eren
2018-09-19 14:16:21 +02:00
parent c52d3f16f9
commit fd830c6416
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ class LocationSensitiveAttention(nn.Module):
super(LocationSensitiveAttention, self).__init__()
self.kernel_size = kernel_size
self.filters = filters
padding = int((kernel_size - 1) / 2)
padding = [(kernel_size - 1) // 2, (kernel_size - 1) // 2]
self.loc_conv = nn.Conv1d(
2,
filters,