Please Help me to solve this Error

Now I changed loss.data[0] in the print statement to loss.item() and now it works.

Thank you very much, ErikJ

Regards
DerBerliner