After playing around with this for a few minutes, it seems that since TensorDataset is a dataset class and not a tensor itself – it won’t support assignment. You can manipulate the values inside of the tensors that your ‘dataset’ is holding (for example try to subtract one by 2) but assignment of a tuple is not possible (which is what is returned when you index into the dataset)