Hey, thanks for the reply!
I’m getting this error on running loss = criterion(output,labels):
`

RuntimeError: 1D target tensor expected, multi-target not supported

Also @ptrblck is right in saying in that  loss = criterion(output, labels) will not work since labels are one-hot encoded. This is because the target in CrossEntropyLoss only accepts 1D tensor.