I work with a portion of Cifar 100 database, so, I extract only data with classes : [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
to make a multiclass prediction of 10 classes.
class ResNet(nn.Module):
...
self.network.fc = nn.Linear(num_ftrs, 10)
With this number of FCL, I find error :
/pytorch/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [0,0,0] Assertion `t >= 0 && t < n_classes` failed.
/pytorch/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [1,0,0] Assertion `t >= 0 && t < n_classes` failed.
But If I change the number of FCL with 20
, the code run.