IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number
摘要:
报错的时候,是因为loss.data[0] 修改后变为loss.item() 阅读全文
posted @ 2021-04-23 10:22 Attack-DrHao 阅读(1275) 评论(0) 推荐(0) 编辑