chetan06:

criterion = nn.CrossEntropyLoss()


Thanks!But the error shows:RuntimeError: Expected object of device type cuda but got device type cpu for argument #1 ‘self’ in call to _thnn_nll_loss_forward