Skip to main content

A minimal barebones ANN library using only numpy

Project description

minimalANN

How to use?

Example :- Suppose this is the network architecture-

Network architecture

To implement the above architecture, we can use the following code -

import numpy as np
import minimalANN.network as network
import minimalANN.layer as layer

nn = network.NeuralNetwork()

nn.layers.append(layer.Layer(1, 2, "sigmoid"))
nn.layers[0].weights = np.array([[-0.27], [-0.41]])
nn.layers[0].bias = np.array([[-0.48], [-0.13]])

nn.layers.append(layer.Layer(2, 1, "linear"))
nn.layers[1].weights = np.array([[0.09, -0.17]])
nn.layers[1].bias = np.array([[0.48]])

X = np.array([[1]])
y = np.array([1.707])

nn = nn.train(X, y, 1)
print(nn.weights)

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

minimalann-1.0.8.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

minimalann-1.0.8-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file minimalann-1.0.8.tar.gz.

File metadata

  • Download URL: minimalann-1.0.8.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for minimalann-1.0.8.tar.gz
Algorithm Hash digest
SHA256 d0e243ac17c18b06d5176eec68eb11455ccdd483bfe12344c0ff09f108a0a805
MD5 a3474c6bb296f5156836c75f06f40f4d
BLAKE2b-256 749d9873ed549d7837c7ec78136127ccaf3c8a924befb04cb6e1fb38d9dbf342

See more details on using hashes here.

Provenance

The following attestation bundles were made for minimalann-1.0.8.tar.gz:

Publisher: workflow.yml on ABarpanda/minimalANN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file minimalann-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: minimalann-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for minimalann-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c1e39d69ff39831d9f11b7ce4b4aa9f954e4585ec12475a72a2004d55a6a19f1
MD5 db1cf42bfba7787bb37de1b5d3930383
BLAKE2b-256 a5e0a606db9fc16e02e298f45a1f32114f52eee7e4d63ca66bb9b6294691b08e

See more details on using hashes here.

Provenance

The following attestation bundles were made for minimalann-1.0.8-py3-none-any.whl:

Publisher: workflow.yml on ABarpanda/minimalANN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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