Update mdtc.py

This commit is contained in:
xiaohou 2021-11-30 17:05:48 +08:00 committed by GitHub
parent f642c0952a
commit 8a50252c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,10 +186,10 @@ class MDTC(nn.Module):
causal: bool,
):
super(MDTC, self).__init__()
self.kernel_size = kernel_size
if kernel_size % 2 == 0:
print("The kernel size of MDTC must be an odd number")
exit(1)
self.kernel_size = kernel_size
self.causal = causal
self.preprocessor = TCNBlock(in_channels,
res_channels,