Skip to main content

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 tensor
    • from_list: Convert a Python list of numerical values into a list of Value class instances
    • to_list: Convert a list of Value class instances back into a Python list of numerical values
    • from_numpy: Convert a NumPy array into a list of Value class instances
    • to_numpy: Convert a list of Value class instances back into a NumPy array
    • from_pandas: Convert a Pandas DataFrame into a list of Value class instances
    • one_hot_encode: Create one-hot encoded vectors from categorical data
  • Example training:
    • Example training on California Housing dataset for regression (toy_classification.ipynb).
    • Example training on Breast Canser dataset for classification (toy_regression.ipynb).
    • Examples of Binary Classification, Multiclass Classification, Regression for demonstrating training (example.ipynb).

Note:

This project is inspired from Andrej Karpathy's "Neural Networks: Zero to Hero - Micrograd" video.

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mikegrad-0.2.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

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

Hashes for mikegrad-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cf98a905e2ad5fcf29760730bbd0e10e32a213838f4ef7831d3350634936f7da
MD5 59fcaf5910a7f1a4199199433f2edeb9
BLAKE2b-256 15a71c76e79ea0f4189ccc7651b0f563eb155d240e275bfe4a1b8e45d6d6b4bb

See more details on using hashes here.

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

Hashes for mikegrad-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b99760d2cbaefbb3443e5d7f980df10a4680e45060d8e57fc78f63130fb921cc
MD5 9a8db7704986d6b32ba9d23b807bb9fc
BLAKE2b-256 913194b9ac64edbae5444390853b5b17328da9ed33d1f56fce176db8d5c405a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page