It seems that there is a bug here
https://github.com/lxdv/ecg-classification/blob/b13236d6114f91df3c82b2fa21b19231cc480496/models/models1d.py#L65F.maxpool_1d takes kernel_size as the second parameter and stride as the third parameter. If you want to specify the stride as it is, it should be something like F.max_pool1d(identity, kernel_size=2, stride=2, padding=1) Otherwise, it may ignore the last dimension of the identity. And this may cause a bug when identity has odd number of dimensions.
It seems that there is a bug here https://github.com/lxdv/ecg-classification/blob/b13236d6114f91df3c82b2fa21b19231cc480496/models/models1d.py#L65
F.maxpool_1d
takes kernel_size as the second parameter and stride as the third parameter. If you want to specify the stride as it is, it should be something likeF.max_pool1d(identity, kernel_size=2, stride=2, padding=1)
Otherwise, it may ignore the last dimension of theidentity
. And this may cause a bug whenidentity
has odd number of dimensions.