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 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.
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
Built Distributions
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 autoneuronet-0.1.7-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 175.6 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6545cbee207c85a9cf89cac7748a7d097bf147ac0fbf21e45a855f68db79c72e
|
|
| MD5 |
6334e059e64e1b871566875404e646e4
|
|
| BLAKE2b-256 |
c77bcc8f7e4744c0340b389da60154e45297082a67895d0aa506c59d4fdedd39
|
File details
Details for the file autoneuronet-0.1.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 236.3 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07a340f4a3440bea2c2ca02eb21a8d5afb236993ce04d127cb0711a8b0c6352e
|
|
| MD5 |
e0c0995eb549c0da24989775051fea9d
|
|
| BLAKE2b-256 |
99fbc84d0b169ac7480d1e80886ad835df572ab6115953637be306f05b50fba1
|
File details
Details for the file autoneuronet-0.1.7-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 176.2 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cf611a8094d90071a689e865dfbb1ec5c10d2a007de7daf2e5f4feffda169a2
|
|
| MD5 |
6283c13db2a7fa455ccd925827216465
|
|
| BLAKE2b-256 |
e7213f0fad075aec1f7749b60f5ab302ff21d977d4900c79954ace0628e62e4b
|
File details
Details for the file autoneuronet-0.1.7-cp313-cp313-macosx_10_13_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 192.3 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f23dcfa2adafa14afe7724c4f43d18c5a392a13e5ff8101a151f2a13c140f44
|
|
| MD5 |
532871249f422af43066c7ffae5fdfe9
|
|
| BLAKE2b-256 |
8ac9386212f98413c44fe880a038be72ceefdf9242b3f575a11db324ed35a5aa
|
File details
Details for the file autoneuronet-0.1.7-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 175.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61e18b0a47fa1e802160eb660abb24b1479bae12af4bc8ae878d42bfe1a931bb
|
|
| MD5 |
c78685d6542b4a731d9f3bb39e690fb1
|
|
| BLAKE2b-256 |
4be58ca0cd425426e48f51eb682d7818909a70cc3704d0078e286dbd6c24d947
|
File details
Details for the file autoneuronet-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 236.1 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59dd8a43d23bc911808e8544c425bae42d9f26ed3e01580c7c42c5180820c907
|
|
| MD5 |
e01cc9e3b0d44b367104223a2f65b9a1
|
|
| BLAKE2b-256 |
f6bd3bda8db5e761d93bc017436e5664481d923b6ec7822b975bd7a9161ed046
|
File details
Details for the file autoneuronet-0.1.7-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 176.1 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3932eae531705229c99879b3e57340bacd29238bf8cad8f58948a2a58f8e2851
|
|
| MD5 |
f83de466f7bd6eb9fa7c0410d7cac994
|
|
| BLAKE2b-256 |
2db79d2ed046b4e3be91b5ba9d691a35f53575440f4985d0e00a1bfbd081036d
|
File details
Details for the file autoneuronet-0.1.7-cp312-cp312-macosx_10_9_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 192.6 kB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
431377962440cba5c13411618f7562a0c40838dd6b8b96200c155c137bd5ec8d
|
|
| MD5 |
796e186248e1c0b302baa15241588560
|
|
| BLAKE2b-256 |
f76ea000562b88d84b42c885f059756bdd982d6b0e4e79a64cf411590dbfcc90
|
File details
Details for the file autoneuronet-0.1.7-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 175.5 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c38206a4c844843da8026bdc87cc682939183971871168f24e9b3f5b0d9ec78
|
|
| MD5 |
ed3b1dfd097709dcbbca0831cbacee5a
|
|
| BLAKE2b-256 |
4f2d587d540be7758872c8123a513bacbeea11e2f594bb8fcb0251314794935f
|
File details
Details for the file autoneuronet-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 236.2 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd4157fba8f529d56e8311cc4d0dff72104c7d2763a51632b0e35ecc4030f0b6
|
|
| MD5 |
f064c2dcfe7e93131b7fd1bb36290e24
|
|
| BLAKE2b-256 |
c6d30c08044a8ecff802b6b769ebbefbee2cafff9ce1e6c0e3b5bf7f05adbfe0
|
File details
Details for the file autoneuronet-0.1.7-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 175.6 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
892028a0ac705ea744412e40ac120861ceb57adad989913b89e3831525806f78
|
|
| MD5 |
76c5bfdba018df97dfa6c0a07c797bfb
|
|
| BLAKE2b-256 |
cb26492aa5bcc4a2af9fb5203ef00186cc3b0ffc2e1f3abd0b0aadd9a4e1b229
|
File details
Details for the file autoneuronet-0.1.7-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 188.8 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89a46ae7758d0c5a5b887a2871515844483904911fd67b36b8a7db1a90f225ab
|
|
| MD5 |
8049a1372258e8238a7cf899087a9253
|
|
| BLAKE2b-256 |
fe4e5f0ba7723393c681b47433f45994282b552a0098574f472d9cffa45fb4f7
|
File details
Details for the file autoneuronet-0.1.7-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 174.4 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
659c1f693495cb32f1186ba78a95fabd8e1a4b3a614e169b9bdab0afbe87e22d
|
|
| MD5 |
d6fa1709a14a2efe89daefe8744415d7
|
|
| BLAKE2b-256 |
b795c9d8576d90adfa585504b648f11776a6cb42b3d60a51dc17b8def2ac4f55
|
File details
Details for the file autoneuronet-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 234.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f9531137eb0706ba8a1a5aa78d8a199d8288db4e4ff578eb2e6532eac5f4105
|
|
| MD5 |
1c795bf340ee3deb4c8b2f1b9c31e866
|
|
| BLAKE2b-256 |
34459e637e9e4e74639506ef248a0e868f157e15333dc71cf135c86301619a3d
|
File details
Details for the file autoneuronet-0.1.7-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 174.4 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44e25acae579e539050f1e27b0fb734df96ed19190c8bb67c2b824cd76421c26
|
|
| MD5 |
77d4eb9ede54ebb56628279db49b1555
|
|
| BLAKE2b-256 |
6fa211c78243f61b134b2befdcacaea736294ddb820bbffa8bb041d0050362ea
|
File details
Details for the file autoneuronet-0.1.7-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 187.5 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74f2a6308a8a23f43a825ef3d5257d00c9c72cdbe695584989eccca0621cf362
|
|
| MD5 |
7e7b403c3460c19592cb12b5213045c7
|
|
| BLAKE2b-256 |
31bff5bc3ff3719f8245e2b5b4ccbaaf1d5c80a3f1b68b861ec9bdacf797e3ef
|
File details
Details for the file autoneuronet-0.1.7-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 188.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e58c0d4a2a539bf37ccec5f3368d3fc40d16c7024d24ab8c0da3ef2c9e9d09c
|
|
| MD5 |
359f31d11735f26f128cd8e9e0d55a17
|
|
| BLAKE2b-256 |
bd27d5a7846eaf4ca2d561b1d54ca879f53a70e2addae0b2cdcf662cb5054aed
|
File details
Details for the file autoneuronet-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 234.7 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f2ed2bd76af896503922cd95e4522e698e0fda5e46a6a924082e8320691b346
|
|
| MD5 |
767354974ac81c65371921d042e80f5f
|
|
| BLAKE2b-256 |
c5b1fb039de9e4b93710a528fb4346ee5ff9f3fbaab3bb910e68fdee6d335fb3
|
File details
Details for the file autoneuronet-0.1.7-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 174.5 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b21e702c4589ddaa3e39831623d15cd8eec878df9d9a5c1a28a8aba03ea8742b
|
|
| MD5 |
4597d9f1e1301c6090262fcb3e623129
|
|
| BLAKE2b-256 |
0681afde6f18c72352a0b565a45ceb5503e1f0b3d164ff81a06265f1c32da1ce
|
File details
Details for the file autoneuronet-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl.
File metadata
- Download URL: autoneuronet-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 187.5 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d64967c06e4bbda24f95d84fe6c6f46c3500bcfc7b06ee1046ca1932b39d8e0
|
|
| MD5 |
872935d747b14595721b60d45e6a5a30
|
|
| BLAKE2b-256 |
1bcededdf1a1644534a6aea64f1d745c3ee4069636ef549dfcf8cbe93cd357ef
|