pytorch dataloader tensor modification
Pytorch DataLoader is a generator, it will generate new batches when iterated through. Hence, as per the best of my knowledge, you can only change the data on the fly. For eg, if you want to replace the first element of your dataset with second element of the datase, you can do something like -
T = torch.tensor(([101,123,414,463],[234,903,313,341]))
train = TensorDataset(T)
train_dataloader = DataLoader(train)

for idx,i in enumerate(train_dataloader):
  if idx == 0:
    i = i[0] # Get the first and the only instance of the batch
    i = train[1][0]

Otherwise, you will need to change your dataset (train variable) and then again create a dataloader for this new dataset.