Open JonathanCourtois opened 10 months ago
Issue type
Description Hi, I found a strange issue in the BatchNorm1d. When using spikingjelly in multistep mode this happens : raise ValueError(f'expected x with shape [T, N, C, L] or [T, N, C], but got x with shape {x.shape} {x.dim()}!') At : https://github.com/fangwei123456/spikingjelly/blob/cb1cee00334ebeca101a155aee694252f85543a8/spikingjelly/activation_based/layer.py#L463
raise ValueError(f'expected x with shape [T, N, C, L] or [T, N, C], but got x with shape {x.shape} {x.dim()}!')
It's the only modification in the commit that produce error I suggest this if it's the comportment desired : if x.dim() > 4 or x.dim() < 3: But I don't understand why 'L' is not necessary ? @fangwei123456
if x.dim() > 4 or x.dim() < 3:
Thank you for your work !
https://pytorch.org/docs/stable/generated/torch.nn.BatchNorm1d.html#batchnorm1d
Issue type
Description Hi, I found a strange issue in the BatchNorm1d. When using spikingjelly in multistep mode this happens :
raise ValueError(f'expected x with shape [T, N, C, L] or [T, N, C], but got x with shape {x.shape} {x.dim()}!')
At : https://github.com/fangwei123456/spikingjelly/blob/cb1cee00334ebeca101a155aee694252f85543a8/spikingjelly/activation_based/layer.py#L463It's the only modification in the commit that produce error I suggest this if it's the comportment desired :
if x.dim() > 4 or x.dim() < 3:
But I don't understand why 'L' is not necessary ? @fangwei123456Thank you for your work !