A minimal autograd framework
Project description
mikegrad
A minimal autograd framework with some custom features.
Features
- Autograd engine: Automatic differentiation for gradient computation
- Backpropagation: Implementation from scratch
- Basic neural network components: Build your own neural networks
- Activation functions:
- Sigmoid
- Tanh
- Softmax
- ReLU
- LeakyReLU
- Loss functions:
- CrossEntropyLoss
- Binary Cross-Entropy Loss (BCELoss)
- Mean Squared Error (MSELoss)
- Optimizers:
- SGD
- Adam
- AdamW
- Utility functions:
argmax: Find the index of the maximum value in a tensorfrom_list: Convert a Python list of numerical values into a list ofValueclass instancesto_list: Convert a list ofValueclass instances back into a Python list of numerical valuesfrom_numpy: Convert a NumPy array into a list ofValueclass instancesto_numpy: Convert a list ofValueclass instances back into a NumPy arrayfrom_pandas: Convert a Pandas DataFrame into a list ofValueclass instancesone_hot_encode: Create one-hot encoded vectors from categorical data
- Example training:
- Example training on
California Housingdataset for regression (toy_classification.ipynb). - Example training on
Breast Canserdataset for classification (toy_regression.ipynb). - Examples of
Binary Classification,Multiclass Classification,Regressionfor demonstrating training (example.ipynb).
- Example training on
Note:
This project is inspired from Andrej Karpathy's "Neural Networks: Zero to Hero - Micrograd" video.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mikegrad-0.2.0.tar.gz
(7.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mikegrad-0.2.0.tar.gz.
File metadata
- Download URL: mikegrad-0.2.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf98a905e2ad5fcf29760730bbd0e10e32a213838f4ef7831d3350634936f7da
|
|
| MD5 |
59fcaf5910a7f1a4199199433f2edeb9
|
|
| BLAKE2b-256 |
15a71c76e79ea0f4189ccc7651b0f563eb155d240e275bfe4a1b8e45d6d6b4bb
|
File details
Details for the file mikegrad-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mikegrad-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b99760d2cbaefbb3443e5d7f980df10a4680e45060d8e57fc78f63130fb921cc
|
|
| MD5 |
9a8db7704986d6b32ba9d23b807bb9fc
|
|
| BLAKE2b-256 |
913194b9ac64edbae5444390853b5b17328da9ed33d1f56fce176db8d5c405a1
|