Hi,
Thank you for your reply! I ran the code on CPU. The execution failed with error-

IndexError: Target 40 is out of bounds.

On cross checking the model, found that the shape of the model’s output did not have the correct number of classes. After correction the model is running fine now.