diff --git a/pytorch_lightning/trainer/train_loop_mixin.py b/pytorch_lightning/trainer/train_loop_mixin.py index 7e9fde01485e3..6130fd4931342 100644 --- a/pytorch_lightning/trainer/train_loop_mixin.py +++ b/pytorch_lightning/trainer/train_loop_mixin.py @@ -290,7 +290,7 @@ def training_forward(self, batch, batch_nb, opt_idx, hiddens): gpu_id = 0 if type(self.data_parallel_device_ids) is list: gpu_id = self.data_parallel_device_ids[0] - batch = self.transfer_batch_to_gpu(batch, gpu_id) + batch = self.transfer_batch_to_gpu(batch.copy(), gpu_id) args[0] = batch output = self.model.training_step(*args)