Merge pull request #20 from wenet-e2e/fix-jingyonghou

fix bug in checking kernel size, kernel size should be a odd number
This commit is contained in:
Binbin Zhang 2021-12-03 10:29:27 +08:00 committed by GitHub
commit 6416f9c7db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,7 +186,7 @@ class MDTC(nn.Module):
causal: bool, causal: bool,
): ):
super(MDTC, self).__init__() super(MDTC, self).__init__()
assert kernel_size % 2 == 0 assert kernel_size % 2 == 1
self.kernel_size = kernel_size self.kernel_size = kernel_size
self.causal = causal self.causal = causal
self.preprocessor = TCNBlock(in_channels, self.preprocessor = TCNBlock(in_channels,