mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
why copy? (#1579)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user