lxdv / ecg-classification

ECG Arrhythmia classification using CNN
MIT License
241 stars 71 forks source link

Bug in F.maxpool_1d? #37

Open XintianHan opened 2 years ago

XintianHan commented 2 years ago

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 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.