Skip to content

internaut/neuralnets_pytorch

Repository files navigation

Machine learning examples from scratch with PyTorch

November 2022 / Markus Konrad [email protected]

Description

Contains three "from scratch" machine learning example implementations.

  • autograd_functions.py shows how to calculate the derivative of a function using PyTorch auto-grad
  • linear_classif_from_scratch.py implements a simple linear model used for binary classification in 2D space on synthetic data
  • nn_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.

License

The source-code is provided under Apache License 2.0 (see LICENSE file).