解决IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Pyth
解决IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number报错代码running_loss += loss.data[0] * inputs.size(0)报错信息IndexError Traceback (most recent call last)<ipython-i