"RuntimeError: dimension specified as 0 but tensor has no dimensions". (line: 24)
--> I changed the dimension using '.view'(-1, 1)' to make the label dimension to be 1 instead of "no dimensions"
"IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number" (line: 80)
--> Since the output of the Cross Entropy Loss here has no dimension, deleted the index term '[0]'.
Error messages were
It was tested with Pytorch 1.1.