首页 / PYTHON / IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python