Skip to content

Documentation added, status bars added, one bug fix, some tidying#1

Open
lasermanick wants to merge 31 commits into
infer-actively:mainfrom
lasermanick:main
Open

Documentation added, status bars added, one bug fix, some tidying#1
lasermanick wants to merge 31 commits into
infer-actively:mainfrom
lasermanick:main

Conversation

@lasermanick

Copy link
Copy Markdown

Most commits add documentation through docs strings or inline comments
The first commit adds tqdm status bars (a later commit adds the option to disable these)
One normalisation bug fixed
Some tidying, including:
to avoid warnings, commenting out the unused layer types that have not been implemented)
removing unused imports

tqdm status bars added to the generative and supervised scripts
Original did not add the normalization transform to the transform list (so MNIST images were not normalised - only scaled to range [0,1] by ToTensor()). Fix is to replace '+' with '+='.
Change default normalization and correct documentation
Added/edited doc strings
Remove redundant initialisation code and unused import (and add one doc string)
Add doc strings to FCLayer methods
Add docstrings and other comments to PCModel class. Also remove one redundant import.
Add some doc strings to utils.py
Add some comments, minor reformatting, add option to disable tqdm progress bars, change some of the parameters (with original values added as comments)
Minor reformatting to be consistent with generative.py , add option to disable tqdm progress bars, change one parameter (with original value added as comment)
Comment out unused (not implemented) layer classes and associated imports
Add comments to PCModel.train_batch_generative()
Added fixed precisions in the form of (identity matrix x constant) where constant is set by layer. Can be disabled. Implemented by optionally calculating precision scaled error term. Execution time increases by ~10% when enabled.
Add default=False to fixed_preds parameter in test_updates() (to match train_updates())
Adjust progress display to match generative.py. (Also use reduced dataset by default, again matching generative.py)
An environment definition. For example, use as follows to define a new environment: conda env create -f environment.yml
Creates figures from Neptune data using Plotly. Defines a class NickFig and some standard colours. For each figure, creates a definition. Finally, creates instances of NickFig with selected definition(s).
Add transforms for gaussian additive noise and update MNIST and FashionMNIST classes to optionally use these. Add scaling to FashionMNIST (following MNIST). Add save_csv() and plot_imgs_alt() methods. Add some comments.
Add comments. Add free energy calculation. Add logging to Neptune. Add code for precision scale factor and precision coverage.
Replace improper use of "is" with "==" x 2.
Added Neptune logging. NOTE: Needs further updates to be aligned with generative.py.
Added Neptune logging. Added plot_example_data_MNIST(). Moved accuracy calculation to calc_accuracy(). Added print_batch_stats(). Made json logging optional. Added saving of label predictions. Added loops for 2D parameter scans.
Ignoring Neptune cache, generated figures, secret keys (constants.py), and temporary/scratch files.
Renamed after adding environment_macos.yml
Use pytorch-nightly channel to enable  Metal (MPS) acceleration in pytorch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant