https://github.com/anker661/autograd-playground
A simple Numpy & Python based auto differentiation system that supports visualization before and after back-propagation.
https://github.com/anker661/autograd-playground
auto-differentiation autograd computaion-graph jupyter-notebook numpy python3
Last synced: about 2 months ago
JSON representation
A simple Numpy & Python based auto differentiation system that supports visualization before and after back-propagation.
- Host: GitHub
- URL: https://github.com/anker661/autograd-playground
- Owner: ANKer661
- License: mit
- Created: 2024-07-08T15:22:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-17T11:46:34.000Z (almost 2 years ago)
- Last Synced: 2025-08-01T12:02:47.965Z (11 months ago)
- Topics: auto-differentiation, autograd, computaion-graph, jupyter-notebook, numpy, python3
- Language: Jupyter Notebook
- Homepage: https://mybinder.org/v2/gh/ANKer661/autograd-playground/main?labpath=autograd-playground.ipynb
- Size: 2.84 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Autograd Playground
Autograd Playground is a simple implementation of automatic differentiation in Python & Numpy. This project allows users to create computation graphs, visualize them, and perform back propagation to understand how gradients flow between tensors.
## Features
- Simple `Tensor` class for creating and manipulating tensors
- Support for basic mathematical operations: (element-wised `+`, `-`, `*`, `/`) and matrix multiplication
- Automatic computation graph construction
- Back-propagation for gradient computation
- Visualization of computation graphs before and after back-propagation
## Project Structure
- `src`
- `tensor.py`: Contains the `Tensor` class implementation
- `operations.py`: Defines various mathematical operations (Add, Subtract, Multiply, etc.)
- `visualization.py`: Provides functions for visualizing computation graphs
- `autograd-playground.ipynb`: Jupyter notebook with examples and explanations
## Installation
1. Clone this repository:
```bash
git clone https://github.com/ANKer661/autograd-playground.git
cd autograd-playground
```
2. Install required dependencies:
```bash
pip install numpy matplotlib networkx
```
Or try out **Binder** for a quick start without any local installation. Click the badge below to launch the project in a Binder environment:
[](https://mybinder.org/v2/gh/ANKer661/autograd-playground/main?labpath=autograd-playground.ipynb)
## Usage
The main interface for this project is through the Jupyter notebook `autograd-playground.ipynb`. To run the notebook:
1. Start Jupyter Notebook:
```bash
jupyter notebook
```
2. Open `autograd-playground.ipynb` in your browser.
3. Run the cells in the notebook to create tensors, build computation graphs, and visualize the results.
## License
This project is licensed under the MIT License. See the LICENSE file for details.