learnopencv
learnopencv copied to clipboard
Update image_classification_using_transfer_learning_in_pytorch.ipynb
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.```