invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a python number
提示 Use tensor.item() to convert a 0-dim tensor to a Python number原语句:running_loss+=loss.data[0]修改后:running_loss+=loss.item()报错原因:版本升级pytorch代码从0.3版本升级版本后的错误...