Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved the MNIST notebook #9

Merged
merged 2 commits into from
Jan 4, 2024
Merged

Conversation

brayevalerien
Copy link
Contributor

Reorganized code

The structure of the notebook has been revised to make apparent a clearer outline:

  1. Library imports
  2. Preliminary code
  3. Model definition
  4. Training
  5. Sample generation

Added notebook parameters

Some useful parameters have been exposed in the cells with the parameters tag. They are global variables that controls the way the notebook behaves (weither to save the model or not, datasets path, global seed for reproducibility...) and how the model is trained (batch size, learning rate, early stopping...).

Improved comments

More insights are now provided in the markdown cells, alongside necessary comments in the code. Unnecessary code comments have been removed or rewritten.
All functions now have a proper signature with type hinting and a docstring.

Better plots

Modified the pyplot theme to produce publication ready plots. Slight modifications/additions have been made to some plots so now they are complete.

Model saving

Once a model is trained, it is saved as a .pt file. This makes it easier to quickly iterate with a fully trained model without having to wait 2 hours each time the notebook is ran.
The model is automatically saved and loaded.


Now that this notebook has been revised, it should be easier to address issue #7 .

Better code organisation, wrote clearer comments, added docstrings and improved plots.
Fixed typos and a bad link
@Algomancer Algomancer merged commit c1b821b into Algomancer:main Jan 4, 2024
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.

2 participants