internaut / neuralnets_pytorch

Neural network from scratch with PyTorch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Machine learning examples from scratch with PyTorch

November 2022 / Markus Konrad post@mkonrad.net

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).

About

Neural network from scratch with PyTorch.

License:Apache License 2.0


Languages

Language:Python 100.0%