SimonW:

torch.Tensor(BB)


So my code is as follows :
inputs, labels,BB = data[‘image’],data[‘label’],data[‘BB’]
print(BB)
print(type(BB))
BB = torch.Tensor(BB)
And the output prints:
152
106
151
130
[torch.LongTensor of size 4]
]
<class ‘list’>
BB = torch.Tensor(BB)
TypeError: ‘torch.LongTensor’ object does not support indexing
Please explain.
Thanks