Hi all, I have an issue related to following error. The cause for the error is known but I cannot find a workaround as I need to run the algorithm that way.
RuntimeError: cuda runtime error (59) : device-side assert triggered at /tmp/pip-req-build-4baxydiv/aten/src/THCUNN/generic/ClassNLLCriterion.cu:110
I have a large set of classes in a dataset and I want to train the model with only a subset at a time. Lets say I have 12 classes [0-11] and classifier’s last layer output shape is 5. With data subset with data labels [0,1,2,3,4], model works perfectly. However, it throws the above error for following class label combinations.
[1,2,3,4,5]
[2,5,6,8,11]
I am using cross_entropy
criterion and last layer is a linera layer. I am fairly new to Pytorch and also searched some solutions in the forum so cound’t find anything related to my requirement. Appreciate any help that can be provided.