We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72097ba commit bd2a53aCopy full SHA for bd2a53a
pytorch_lightning/plugins/training_type/single_device.py
@@ -65,10 +65,12 @@ def model_to_device(self) -> None:
65
self._model.to(self.root_device)
66
67
def pre_dispatch(self) -> None:
68
+ # Ensures any additional parameters defined in setup are moved to the correct device.
69
self.model_to_device()
70
71
def connect(self, model: torch.nn.Module) -> torch.nn.Module:
72
self._model = model
73
+ self.model_to_device()
74
return self.model
75
76
@property
0 commit comments