Hello I try to train my CNN in pytorch. Everything gone well except my code line running_loss += loss.data[0] . I have tried to trace it. Here is the size of input.

Produce by this code.

image.jpg564×647 220 KB

Here is full error.

image.png959×421 125 KB

Any one know how to fix this?
-Thank you-