Commit 8300a521 authored by ngimel's avatar ngimel Committed by Myle Ott
Browse files

use implicit padding when possible

parent ae2585d9
......@@ -123,7 +123,7 @@ class FConvEncoder(FairseqEncoder):
self.projections.append(Linear(in_channels, out_channels)
if in_channels != out_channels else None)
if kernel_size % 2 == 1:
padding = kernel_size // 2
padding = kernel_size //2
else:
padding = 0
self.convolutions.append(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment