Hi All,
Can someone please help with the below error.
I have no idea what went wrong and here is my error and code link from my Github please help in fixing the error.
As the error message suggests, you should use tensor.item() instead of tensor[0].
Also, don’t use the .data attribute, as it might yield unwanted side effects.