November 2022 / Markus Konrad [email protected]
Contains three "from scratch" machine learning example implementations.
autograd_functions.py
shows how to calculate the derivative of a function using PyTorch auto-gradlinear_classif_from_scratch.py
implements a simple linear model used for binary classification in 2D space on synthetic datann_from_scratch.py
implements a simple two-layer sequential neural network that is trained and evaluated on the MNIST dataset
All examples use only "basic" torch functions and auto-grad. The two last examples are originally found in Deep Learning with Python by François Chollet but were adapted to PyTorch.
The source-code is provided under Apache License 2.0 (see LICENSE
file).