Thanks for your answer, But I still have some issues with that.
I’m debugging on my windows (cpu only) , and I don’t have this problem, but when I take exactly the same files to  my machine on (unix  with 1 GPU) I do get this error, do you have any Idea , why is that happening?
maybe the nn.CrossEntropyLoss.cuda() is acting differently?
Thanks.