How to determine the device from within a LightningDataModule
#3341
Labels
question
Further information is requested
LightningDataModule
#3341
❓ Questions and Help
What is your question?
Is there a recommended way (or is it even at all possible) to determine which device is used from within the new
LightningDataModule
?I ask the question because right now I decide how to set
pin_memory
when initializing the dataloaders based on the device. Prior to 0.9, the_dataloaders()
methods were part of theLightningModule
and I could simply accessself.device
to check the device the data would be transferred to.Code
Example of what I did before 0.9:
What have you tried?
I've checked the doc and API of the
LightningDataModule
, but I don't see any indications of how to get the device.What's your environment?
The text was updated successfully, but these errors were encountered: