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.
Reorganized code
The structure of the notebook has been revised to make apparent a clearer outline:
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 .