kindly anyone help me how to solve this problem.i have  try many solutions but no one works…
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number

image.png1339×194 13.5 KB

for i in range(4):
            label = labels[i]
            class_correct[label] += c[i].item()
            class_total[label] += 1