Hi,
My program has zero-dimension tensor like a
[1, 2, 3, ...]

I want to fetch one item from the tensor, so I did
scalar_val = val[index_val].item()

But it still makes same error of;
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number

How to solve this issue?
Best,
S.Takano