Skip to content

About

A deep learning framework built from scratch featuring a tensor-based autograd engine, automatic differentiation, backpropagation, and neural network training on MNIST.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tensor-grad

An automatic differentiation engine built from scratch using Python and NumPy.

This project implements basic tensors, backpropagation, and neural network layers to understand how deep learning frameworks work internally.

Features

  • Tensor operations
  • Automatic differentiation
  • Backpropagation
  • ReLU activation
  • Softmax and cross-entropy loss
  • Linear layers
  • Multi-layer perceptron (MLP)
  • MNIST example

Installation

Clone the repository:

git clone https://github.com/NullPointer-01/tensor-grad.git
cd tensor-grad

Install NumPy:

pip install numpy

Usage

from tensor import Tensor

x = Tensor(2.0)
y = Tensor(3.0)

z = x * y
z.backward()

print(x.grad)
print(y.grad)

Neural Network

A simple MLP can be created using:

from nn import MLP

model = MLP(784, [128, 64, 10])

An MNIST training example is available in demo.ipynb.

License

MIT

About

A deep learning framework built from scratch featuring a tensor-based autograd engine, automatic differentiation, backpropagation, and neural network training on MNIST.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages