Thank you for the answer! This is the _getitem__
function of TensorDataset
:
def __getitem__(self, index):
return tuple(tensor[index] for tensor in self.tensors)
It’s supposed to return a tuple, so I’m a bit confused on why my MWE returns the type of a list.