Hardware agnostic training #16521
Unanswered
yhl48
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to transfer a newly defined tensor in a
torch.nn.Module
class method to the device recognised by Lightning other than doingx.to(y)
or calling aregister_buffer
in the initialisation as explained in the link below?https://pytorch-lightning.readthedocs.io/en/latest/accelerators/accelerator_prepare.html
This is an issue in cases where a tensor has to be defined in a method without access to the other tensors' device.
Beta Was this translation helpful? Give feedback.
All reactions