I am getting this error only during the testing phase, but I do not face any problem in the training and validation phase.
The code snippet looks like the one below,
The “lab” is a tensor value and prints out the range in such a way,
tensor([6, 7, 8]) tensor([ 9, 10, 11]) tensor([21, 22, 23])
(Note*: the length of this lab tensor can be of length ‘n’ based on the value of ElementsPerClass)