why copy? (#1579)
This commit is contained in:
parent
29ebe92208
commit
68ca577919
|
@ -131,3 +131,8 @@ ENV/
|
|||
.data/
|
||||
datasets/
|
||||
mnist/
|
||||
|
||||
# pl tests
|
||||
ml-runs/
|
||||
*.zip
|
||||
pytorch\ lightning
|
|
@ -752,7 +752,7 @@ class TrainerTrainLoopMixin(ABC):
|
|||
|
||||
# Horovod
|
||||
elif self.use_horovod and self.on_gpu:
|
||||
batch = self.transfer_batch_to_gpu(copy.copy(batch), hvd.local_rank())
|
||||
batch = self.transfer_batch_to_gpu(batch, hvd.local_rank())
|
||||
args[0] = batch
|
||||
output = self.model.training_step(*args)
|
||||
|
||||
|
@ -771,7 +771,7 @@ class TrainerTrainLoopMixin(ABC):
|
|||
|
||||
# TPU support
|
||||
elif self.use_tpu:
|
||||
batch = self.transfer_batch_to_tpu(copy.copy(batch))
|
||||
batch = self.transfer_batch_to_tpu(batch)
|
||||
args[0] = batch
|
||||
output = self.model.training_step(*args)
|
||||
|
||||
|
|
Loading…
Reference in New Issue