Aedev simple - #35
Draft
asia281 wants to merge 14 commits into
Draft
Conversation
This reverts commit 35bac23.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…ChainModel implementation. Test ChainModel a little bit.
asia281
commented
Aug 22, 2024
| from pathlib import Path | ||
|
|
||
|
|
||
| def test_hdf5SparseDataset(): |
Contributor
Author
There was a problem hiding this comment.
Split this test into 3 tests.
asia281
commented
Aug 22, 2024
| assert (distances.dist_yy >= 0).all() | ||
|
|
||
|
|
||
| def test_calc_mmd(): |
Contributor
Author
There was a problem hiding this comment.
Split into 2 tests.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towards highly configurable AE [UNFINISHED]
The major goal is to build maintainable and readable standard for model development throught the project with hight configurability and readable data processing pipeline. The pull includes dense model oriented modules and provides (hopefully generalizable) standard of model decomposition into composable components.
In
utilsadd:utils.common_typesfor handling tailored datatypes and strustures used throught different project files including:Batch- defining batch loaded and processed by dense model components. Aligned with the dataloader batch output.StructuredForwardOutput- output of the dense model components containing batch and losses returned by the model componentConfigStructure- specification of the config structure bound with class taking configNamespacevariable as an input. Used to validate the input config structure to filter out config errors at the initialization stage. Each class should have corresponding variable containingConfigStructureobject.utils.configfor managing configuration files and variables including:validate_config_structure- used for validating config variable passed to the model component constructor (related withConfigStructure)yamlconfiguration filesIn
modelsadd:models.blocks- a module with main componentStackedBlocksinput, output as well as intermediate dimensions might be specified to define a dense block (e.g dense encoder). Composed of lower levelBlocksfor which activation, normalization and dropout might be specified in any combination and with additional kwargs all in configuration file. The code should be eaisily extendible to incorporate other modules composing aBlock. It should allow to eaisiliy define dense encoder or decoder of typical structure with decent level of configurability based solely on the passed config file.models.latent- a module for latent processing including:torch.distributionsin the desired formatGaussianPosterior- a module adding gaussian posterior with entropy loss calculation on top of inputted batch_GM- abstract parent class for handling gaussian mixture with trainable parametersGaussianMixturePriorNLL(_GM)- a module calculating nll in the trainable GM prior in a conditionable manner with a possibility of partly labeled data (-1 denotes lack of component label)GaussianMixturePriorNLL(_GM). No conditioning and additional constraint on spread of compnents is added.LatentConstraint- explicit constraint on latent as in RAEmodels.loss- utils for managing losses in display and calculating constaints and loss aggregation -> vae vs iwaemodels.misc- data aggregation in the data processing with 'AggregateDataAdapter' added to the chain model as a model component it also allows to rename some batch elements - it should allow option "none" for renaming or sthgAdd base for
models.chain.ChainModela highly configurablenn.Modulechildred allowing for specifying chains of batch processing operations e.g. dense blocks + vae posterior + vae prior + dense block + latent fuzzy clustering + dense block + vae prior + dense block + wae constraint etc. (exaggerated) meaning a hierarchical model (in the simplest sense) might be build seamlessy) as well as any dense encoder decoder model with vae, iwae with gaussian posteriors and gaussian mixture parameterised posterior might be build and multiple extensions might be added to the codebase in a readable, maintainable (hopefully) and standardised format.