patrickloeber/pytorchTutorial

14_cnn.py line 117

Mosheam opened this issue · 2 comments

Hi @python-engineer ,
Your codes and videos are really helpful thanks a lot!
Just a small doubt: in 14_cnn.py line 117 shouldn't be min(labels.size(0),batch_size) instead of batch_size . Otherwise if batch size = 3 you get an error.

yeah you are right, my code is not correct for the last batch. it should just be labels.size(0)

Found this issue too. Thank you for the posting this.