[Update]
Converting label to int8 solved this issue. Thank you. I am accepting your earlier comments as solution.
Below is the sample getitem for a single index.
getitem tensor([[[0., 0., 0.,  …, 0., 0., 0.],
[0., 0., 0.,  …, 0., 0., 0.],
[0., 0., 0.,  …, 0., 0., 0.],
…,
[0., 0., 0.,  …, 0., 0., 0.],
[0., 0., 0.,  …, 0., 0., 0.],
[0., 0., 0.,  …, 0., 0., 0.]]], dtype=torch.float64) label [‘1’]
One more thing I would like to add. Here, batch_size is 16. I kept the printing for each index. It seems that, get_item is called 16 times (prints all 16 tensors), then the issue occurs. Probably, when it wants to access the second batch, it can not do that and gives the error.