learnopencv icon indicating copy to clipboard operation
learnopencv copied to clipboard

Update image_classification_using_transfer_learning_in_pytorch.ipynb

Open kooscode opened this issue 3 years ago • 0 comments

Num classes should not be entries -1

Otherwise last layer does not match input labels and you will get this error

/pytorch/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [7,0,0] Assertion `t >= 0 && t < n_classes` failed.```

kooscode avatar Nov 14 '20 23:11 kooscode