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
Extract dataset definition out of the LightningModule
Motivation
Separation of data from the model.
Pitch
The datasets loaders could easily be passed to the fit method directly instead of having to define them inside the LightningModule, this avoids having a single class that possibly contains: data, data pipeline params, model, model hyperparams.
The basic example cloud look like this:
frompytorch_lightningimportTrainertrain_dataloader=DataLoader(...)
val_dataloader=DataLoader(...)
model=CoolSystem()
# most basic trainer, uses good defaultstrainer=Trainer()
trainer.fit(model, train_dataloader=train_dataloader, val_dataloader=val_dataloader)
Its much more natural to how you usually structure your code in scikit-learn or keras.
Alternatives
They could also be based to the Trainers constructor.
The text was updated successfully, but these errors were encountered:
🚀 Feature
Extract dataset definition out of the
LightningModule
Motivation
Separation of data from the model.
Pitch
The datasets loaders could easily be passed to the
fit
method directly instead of having to define them inside theLightningModule
, this avoids having a single class that possibly contains: data, data pipeline params, model, model hyperparams.The basic example cloud look like this:
Its much more natural to how you usually structure your code in
scikit-learn
orkeras
.Alternatives
They could also be based to the
Trainer
s constructor.The text was updated successfully, but these errors were encountered: