You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to undestand for these wrappers whether there's a particular reason that each of them is implemented differently
Optimizer -> decorates the original optimizer, but doesn't sub-class "Optimizer".
Module -> decorates the forward function of the original Module, and sub-classes Module.
DataLoader -> directly sub-classes DataLoader, changing it's functionality .
Would it make sense to standardize this a little? Also do these classes need to be "private"?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to undestand for these wrappers whether there's a particular reason that each of them is implemented differently
Optimizer -> decorates the original optimizer, but doesn't sub-class "Optimizer".
Module -> decorates the forward function of the original Module, and sub-classes Module.
DataLoader -> directly sub-classes DataLoader, changing it's functionality .
Would it make sense to standardize this a little? Also do these classes need to be "private"?
https://github.com/PyTorchLightning/pytorch-lightning/blob/c614cf0c3d7a252bfd01ff8516f9f42f1c1b055a/pytorch_lightning/lite/wrappers.py#L30
Beta Was this translation helpful? Give feedback.
All reactions