mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-29 13:30:57 +08:00
1 parent
de1fdd8d3b
commit
4b30ef6480
5 files changed
+13
-1
No files matched your search
@@ -46,7 +46,9 @@ This will make your code scale to any arbitrary number of GPUs or TPUs with Ligh
|
||||
# with lightning
|
||||
def forward(self, x):
|
||||
z = torch.Tensor(2, 3)
|
||||
z = z.type_as(x)
|
||||
z = z.type_as(x, device=self.device)
|
||||
|
||||
Every LightningModule knows what device it is on. You can access that reference via `self.device`.
|
||||
|
||||
Remove samplers
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
Reference in new issue
Block a user