Refactoring of Likelihood modules (Gaussian & Noise Models) for Ladder VAE model. This PR is a first step towards the implementation of the training_step and validation_step methods for LVAE lightining module
What: Continued the work started in #187 with the aim of polishing and testing the code for loss computation.
Why: The existing code used to work with different configs and contained some superfluous parts, which added annoying complexity and length to the overall LVAE implementation.
How: Replaced old configs with pydantic models, removed unused functions and class attributes and methods, simplified the logic in some parts of the code, and added tests to check that modules work as expected.
Changes Made
Added: More comprehensive tests for likelihoods and noise models. The rest is just the refactoring of existing code.
Modified: Among many small modifications to make code cleaner and clearer, structural refactoring (compared to #187) was applied to the model used for noise models. Specifically, the noise model is now modeled by MultiChannelNmModel as a list of GaussianMixtureNmModel's, one for each target channel (e.g., 1 in HDN, >1 for denoiSplit). For consistency, these change were also applied to the noise model instantiation and likelihood computation accordingly.
Removed: Some deprecated tests for noise model.
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)
Description
Refactoring of Likelihood modules (Gaussian & Noise Models) for Ladder VAE model. This PR is a first step towards the implementation of the
training_step
andvalidation_step
methods for LVAE lightining modulepydantic
models, removed unused functions and class attributes and methods, simplified the logic in some parts of the code, and added tests to check that modules work as expected.Changes Made
MultiChannelNmModel
as a list ofGaussianMixtureNmModel
's, one for each target channel (e.g., 1 in HDN, >1 for denoiSplit). For consistency, these change were also applied to the noise model instantiation and likelihood computation accordingly.Please ensure your PR meets the following requirements: