Skip to main content

AutoNeuroNet is a fully implemented automatic differentiation engine with custom matrices and a full neural network architecture and training pipeline. It comes with Python bindings through PyBind11, allowing for quick and easy development of networks through Python, backed with C++ for enhanced speed and performance.

Project description

AutoNeuroNet logo

AutoNeuroNet is a fully implemented automatic differentiation engine with custom matrices and a full neural network architecture and training pipeline. It comes with Python bindings through PyBind11, allowing for quick and easy development of networks through Python, backed with C++ for enhanced speed and performance.

See AutoNeuroNet in action with a simple 3D visualization of gradient descent through reverse-mode automatic differentiation and backpropagation of gradients:

AutoNeuroNet Gradient Decsent 3D Visualization

Install AutoNeuroNet with PIP:

pip install autoneuronet

See the full documentation at https://rishabsa.github.io/AutoNeuroNet/

Quickstart

To get started with AutoNeuroNet, import the package. AutoNeuroNet allows you to make automatically differentiable variables and matrices easily through the Var and Matrix classes, which store values and gradients as doubles.

Scalar Automatic Differentiation

import autoneuronet as ann

x = ann.Var(2.0)
y = x**2 + x * 3.0 + 1.0

# Set the final gradient to 1.0 and perform Backpropagation
y.setGrad(1.0)
y.backward()

print(f"y: {y.val}") # 11.0 = (2)^2 + 3x + 1
print(f"dy/dx: {x.grad}") # 7.0 = 2x + 3

Matrix Initialization

import autoneuronet as ann

X = ann.Matrix(10, 1)  # shape: (10, 1)
y = ann.Matrix(10, 1)  # shape: (10, 1)

for i in range(n_samples):
    X[i, 0] = ann.Var(i)
    y[i, 0] = 5.0 * i + 3.0 # y = 5x + 3

Matrix Math

import autoneuronet as ann

X = ann.Matrix(2, 2)
X[0] = [1.0, 2.0]
X[1] = [3.0, 4.0]

Y = ann.Matrix(2, 2)
Y[0] = [5.0, 6.0]
Y[1] = [7.0, 8.0]

# Z = ann.matmul(X, Y)
Z = X @ Y
print(Z)

# Output:
# Matrix(2 x 2) =
# 19.000000 22.000000
# 43.000000 50.000000

NumPy to Matrix

import autoneuronet as ann
import numpy as np

x = np.array([[1.0, 2.0], [3.0, 4.0]])
X = ann.numpy_to_matrix(x)
print(X)

# Output:
# Matrix(2 x 2) =
# 1.000000 2.000000
# 3.000000 4.000000

Neural Networks, Loss Functions, and Optimizers

AutoNeuroNet supports several types of layers, including Linear fully-connected layers and activations functions such as ReLU, Sigmoid, or Softmax.

import autoneuronet as ann
import numpy as np

model = ann.NeuralNetwork(
    [
        ann.Linear(784, 256, init="he"),
        ann.ReLU(),
        ann.Linear(256, 128, init="he"),
        ann.ReLU(),
        ann.Linear(128, 10, init="he"),
        ann.Softmax(),
    ]
)
optimizer = ann.SGDOptimizer(
    learning_rate=1e-2, model=model, momentum=0.9, weight_decay=1e-4
)

print(model)

AutoNeuroNet also supports several loss functions, such as the MSELoss, MAELoss, BCELoss, CrossEntropyLoss, and CrossEntropyLossWithLogits, and optimzers, such as GradientDescentOptimizer and SGDOptimizer.

loss = ann.MSELoss(labels, logits)
loss.setGrad(1.0)
loss.backward()

optimizer.optimize()
optimizer.resetGrad()

print(f"Loss: {loss.getVal()}")

Reference Resources used in the development of AutoNeuroNet:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

autoneuronet-0.1.9-cp313-cp313-win_amd64.whl (175.7 kB view details)

Uploaded CPython 3.13Windows x86-64

autoneuronet-0.1.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (236.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

autoneuronet-0.1.9-cp313-cp313-macosx_11_0_arm64.whl (176.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

autoneuronet-0.1.9-cp313-cp313-macosx_10_13_x86_64.whl (192.4 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

autoneuronet-0.1.9-cp312-cp312-win_amd64.whl (175.6 kB view details)

Uploaded CPython 3.12Windows x86-64

autoneuronet-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (236.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

autoneuronet-0.1.9-cp312-cp312-macosx_11_0_arm64.whl (176.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

autoneuronet-0.1.9-cp312-cp312-macosx_10_9_x86_64.whl (192.7 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

autoneuronet-0.1.9-cp311-cp311-win_amd64.whl (175.6 kB view details)

Uploaded CPython 3.11Windows x86-64

autoneuronet-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (236.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

autoneuronet-0.1.9-cp311-cp311-macosx_11_0_arm64.whl (175.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

autoneuronet-0.1.9-cp311-cp311-macosx_10_9_x86_64.whl (188.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

autoneuronet-0.1.9-cp310-cp310-win_amd64.whl (174.5 kB view details)

Uploaded CPython 3.10Windows x86-64

autoneuronet-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (234.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

autoneuronet-0.1.9-cp310-cp310-macosx_11_0_arm64.whl (174.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

autoneuronet-0.1.9-cp310-cp310-macosx_10_9_x86_64.whl (187.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

autoneuronet-0.1.9-cp39-cp39-win_amd64.whl (188.2 kB view details)

Uploaded CPython 3.9Windows x86-64

autoneuronet-0.1.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (234.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

autoneuronet-0.1.9-cp39-cp39-macosx_11_0_arm64.whl (174.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

autoneuronet-0.1.9-cp39-cp39-macosx_10_9_x86_64.whl (187.6 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file autoneuronet-0.1.9-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 019c0a2ff4ec9b89f0362b1076053b87b07e4d9e59d86107b85e3ab5d270ae48
MD5 b7e15c22814fb5fd728afdd235770d14
BLAKE2b-256 76c76bb92102ef121189021def81abb8f699e6ecd8105f8516c42e7d33f6f11b

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44f9831fd33a2b2eb210a1f23d0640de9d80c3f191256ab9107074e4eb2168f5
MD5 32a274f3809637a0bc65a47d03838f49
BLAKE2b-256 c82209f926fba33fa54006da92c6736db50fd7d4db0a802e191812dfb9e0bea9

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 11559e3698db621b37c6c7c97e7699401f84e9a49e3b288f156e34a1bfa5d473
MD5 73783aaac64ac2fbd9c1220fbcad2c57
BLAKE2b-256 bc49417c1d300f64bdf7c650df55e1761855fd9e87e3fc7582c7fbb696114c3b

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 41837a2358974049c410686e052018318f31748813c585aa03172ac814868b97
MD5 dbdd5b397531ceecf84b348c1b363f40
BLAKE2b-256 066af54b6188de21e4a75d74783aa77fdb2b81bb95746de887671513ecce4da3

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 86464fefa1b121ad1c82651ae008fc56423ba5a1f6d6aea43c4b4ceb34b42fc3
MD5 35ea11249a5072568e8dd985405e28b6
BLAKE2b-256 85e02c6032b39efebcc257253d06fbb466756375560d5ba23d52739c95c933d1

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 df8330335400841dcf00f985728e45ce29ba09a357c38f7fa4924918c0da780c
MD5 67f475c55d21b59b34f1823f7de35e6c
BLAKE2b-256 cf3fcabb506e15973907a6635b9a1a3c182eb867d33a557ae9156adca79a246c

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc007d2d6c9eb48a4f692c4c7cee8b85e3fa39a711fd0f2e823657ceff81ca7f
MD5 65b9886f7eddccb3d12a93f830a1d0c0
BLAKE2b-256 22960eba74098f7f05c740b2bd71828abbaa58eee1d6f061f117095dc07faa93

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 497ac98fab5a7dcb409cd77898ee88d3e7ef14d98d7b1b8a5b236cba985d4874
MD5 f1e967ed612f5506ace33c0fa2e57f60
BLAKE2b-256 ae7482ed9bcb4ef500b2cb3216d5282cc6d2f0d9b45d0082e55d779aec663b10

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 10fa13b06c70e43b26afeb94f19fe86a789b8fd5ad0edda2610de4deac19c2d8
MD5 f4a9b1175c25227d95628978123a5c9b
BLAKE2b-256 264a353ccabcf4fd033122080d531a6604ccc36e3ed1a6ac56e1ca1884c80e04

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f0f539b99cf4bf0bc856bd9b74d697951d181a287beebc589fc258739fa4fe3
MD5 caefeb0673633225f8d5957dde905d48
BLAKE2b-256 c1adceaeae942f1a155e9864cbb705b20bb96e1fa54becd77b247f54a7294cca

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 944f2c403a91fd1b3a9680b1c6f96c730e6ddeb403b206f092be4bfc9d7701a0
MD5 4712fcccdd9bcb3c5d556cea5d7bf3f6
BLAKE2b-256 2210f38d3877acc4c852ef0db11cc9b1ec6155cd0e6f7b462267830aa0a8abb8

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a9a6a63c815fc925ba56498babc5184a8aecefd50ad4069da2602f245457f70b
MD5 3b69c8a2ef7531f472b0ff238142274a
BLAKE2b-256 eb3c3b1e8fecd731e88b59cc5ad69db17d6b6c26e406357ff0075b6917e612f1

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d01c17c1b6321cac3561ecc0345f39e52cec307de2cab6a4a16f98efdcb0d614
MD5 3370143ad9faebb4aca98a9be9e8b5f0
BLAKE2b-256 14f71f7ea01bc681f094d5afc454b7a394e4ee003fe14f37d18119dabde408e8

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 52272a531b071cf82a784924d2f81cbbd010e79030089a2437e6e4d4084a4e0c
MD5 35d2d7a3dcfe0f6a1e57c62635973941
BLAKE2b-256 824c54c253360b57218000aceaba1f3c3b3ff98891ed0f2da9f3aa41f926d04a

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 792c9637be9bea1a5d8e90e19b029214ee794c5170c4fa3d1977931a0e8b648d
MD5 3f91f6785e6473eecd65a6cd9c2579ee
BLAKE2b-256 a4a4df6223c4b589fe2e489b74be47560e3079618573290611d1b83ad1f68d7a

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4b5c8647784a3cac37d3a1dc7271d9251d2929eba54685338744c43a242ef4f7
MD5 03bd8137f0b2606535b1f2d8d50c706a
BLAKE2b-256 ec924254ed28056496c6fcefefe58579695aa0d7fb63f7d3682df8036abca8c0

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: autoneuronet-0.1.9-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 188.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for autoneuronet-0.1.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e08767d74508722144bef5da4673a5e63fe3090fb06d4dc7985ab54d17dcbc18
MD5 df93dfbc921aa8177dbe563bf632f1ea
BLAKE2b-256 572563933c843e4ca229bbc6a5fe47c1f0892273a41e72cdfbdcdae2701d8692

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1caf0d5cf5e2aae99faa49fa6103baa4ee6cfbc08eca771433208f271803d7de
MD5 6b4c00f358816b0c29a7b7da04eda34a
BLAKE2b-256 89f5a829add6bf773bcfcee9bc25ffc3491f033202dad4b96ceb8779013c87be

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0d400738b56c81dcbab33313e225144aa85272c7df353c64a377fcac3b4f1a8
MD5 e6d99f2d5f6b29838bbfd856396db07a
BLAKE2b-256 8989d68927f170b27580631db84c188f52e7c79f5ce2e78fbcf0ad6aea0eba37

See more details on using hashes here.

File details

Details for the file autoneuronet-0.1.9-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for autoneuronet-0.1.9-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 90e991b307baf33287303f35a582b5068bc81440d7eee3f677cb24dddbed397d
MD5 0df3ee7f9b82d6e88c824fc4179c338d
BLAKE2b-256 f48711f99d10306b73b96e8405bc90f0a78b3fc6cfac019515a0ef178091fa3b

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