Expected more than 1 value per channel when training - On pspnet
vcartillier3 opened this issue · 1 comments
vcartillier3 commented
It seems Batchnorm module won't take a batch of size 1.
You can check pytorch/pytorch#4534
So during training if your last batch only has one element it was raise this error. Adding the following as a workaround:
in train.py
:
if not images.size()[0]>1:
continue
pytorch-1.1.0
Da-He commented
It seems Batchnorm module won't take a batch of size 1.
You can check pytorch/pytorch#4534So during training if your last batch only has one element it was raise this error. Adding the following as a workaround:
in
train.py
:if not images.size()[0]>1: continue
pytorch-1.1.0
Exactly. Thanks!