Only one element tensors can be converted to Python scalars? I am getting this error while preparing my dataset for DataLoader

Not sure if this is the root of the issue but __len__() should return an integer, not a string or anything else