-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented
training_step
and validation_step
, fixed all the conf…
…igs needed to instantiate the lightning module (#218) ### Description This PR finally implements a working training loop for the lightining module `VAEModule`. - **What**: we added `training_step` and `validation_step` plus all the required methods. We also fixed some bugs in the configs (`pydantic` model) describing the different model components. - **Why**: To be able to train a LVAE model. - **How**: see below. ### Changes Made - **Added**: - `training_step` and `validation_step` in the lightning `VAEModule` (plus other related methods). - Some required attributes and validators in the `VAEAlgorithmmConfig`. - An example notebook to illustrate how to train the LVAE model using current lightning API. - `RunningPSNR` class in `metrics.py`. - Tests for the added features. - **Modified**: - Typing and validators in different `pydantic` models (e.g., `lvae_model.py`, `nm_model.py`) - **Removed**: Nothing in particular. ### Things that can be improved - `validation_step` requires some additional methods for computing the PSNR at each epoch. These methods are currently within the `VAEModule` since require some of its attributes. If possible, it would be nice to move this methods out of the lightning module to have something cleaner. --- **Please ensure your PR meets the following requirements:** - [x] Code builds and passes tests locally, including doctests - [x] New tests have been added (for bug fixes/features) - [x] Pre-commit passes - [ ] PR to the documentation exists (for bug fixes / features) --------- Co-authored-by: CatEek <[email protected]> Co-authored-by: Joran Deschamps <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: melisande-c <[email protected]>
- Loading branch information
1 parent
692429e
commit 427fa26
Showing
14 changed files
with
1,352 additions
and
75 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.