|
|
|
@ -122,7 +122,7 @@ class ConvolutionModule(nn.Layer):
|
|
|
|
|
|
|
|
|
|
# mask batch padding
|
|
|
|
|
if mask_pad is not None:
|
|
|
|
|
x.masked_fill_(mask_pad, 0.0)
|
|
|
|
|
x = x.masked_fill(mask_pad, 0.0)
|
|
|
|
|
|
|
|
|
|
if self.lorder > 0:
|
|
|
|
|
if cache is None:
|
|
|
|
@ -156,7 +156,7 @@ class ConvolutionModule(nn.Layer):
|
|
|
|
|
|
|
|
|
|
# mask batch padding
|
|
|
|
|
if mask_pad is not None:
|
|
|
|
|
x.masked_fill_(mask_pad, 0.0)
|
|
|
|
|
x = x.masked_fill(mask_pad, 0.0)
|
|
|
|
|
|
|
|
|
|
x = x.transpose([0, 2, 1]) # [B, T, C]
|
|
|
|
|
return x, new_cache
|
|
|
|
|