Skip to main content

Neonet is a deep learning tool for building simple to medium sized neural networks, it supports multiple configurations and arguments for training

Project description

Neonet (Neural Network with Numpy)

Neonet is a lightweight NumPy-based neural network library for building and experimenting with simple deep learning models. It is designed for small and medium scale projects, prototyping, and understanding core neural network workflows without relying on large frameworks like TensorFlow or PyTorch..

Features

  • Fully connected (dense) neural network architecture
  • Built entirely with NumPy
  • Multiple activation functions
  • Multiple optimization algorithms
  • Mini-batch gradient descent training
  • Learning rate decay support
  • Model evaluation during training
  • Configurable regularization techniques
  • Suitable for educational and research purposes
  • Lightweight and easy to use

Installation

Install Neonet from PyPI:

pip install neonet

Quick start

Import the required classes:

from neonet.nn import NeuralNetwork, TrainArg

Create a Neural Network

Create a multi-layer neural network with customizable activation functions

nn = NeuralNetwork(4, [(16, "LeakyReLU"), (8, "LeakyReLU"), (3, "Softmax")])

Training Configurations

Neonet allows you to configure various training parameters, including:

  • Batch size
  • Learning rate
  • Optimizer
  • Loss function
  • Regularization method
  • L1/L2 coefficients
  • Beta coefficients for adaptive optimizers
  • Number of epochs
  • Learning rate decay

Example

training_args = TrainArg(
batch_size=16,
learning_rate=0.001,
optimizer="adams_loss",
loss="MSE",
epochs=500,
logging_steps=100,
use_decay=True
)

Train a Model

Train your neural network and evaluate performance.

nn.train(X_train, y_train, training_args=training_args, eval_dataset=[X_test, y_test], check_loss=True)

Predictions

Make predictions with your model:

nn.predict(x)

Save and load your model

save your model after training or load a trained model

# to save
nn.save("model.joblib")
# to load
nn.load("model.joblib")

Supported Components

Activation Functions

  • ReLU
  • LeakyReLU
  • ELU
  • Sigmoid
  • Tanh
  • Softmax

Initialization

  • Xavier
  • He

Optimization Methods

  • SGD
  • Adam loss

Regularization Methods

  • L1 Regularization(Lasso)
  • L2 Regularization(Ridge)

Use case

Neonet is suitable for:

  • Prototyping neural network architectures quickly
  • Small to medium-scale machine learning tasks
  • Experimenting with activation functions, optimizers, and loss functions
  • Research and algorithm testing
  • Running lightweight models on CPU-only environments
  • Exploring neural network behavior through a NumPy-based implementation

Why Neonet?

Unlike large deep learning frameworks, Neonet focuses on simplicity, transparency, and educational value. The library makes it easier to understand the mechanics of forward propagation, backpropagation, optimization, and regularization while still providing practical training capabilities.

Contributions

Contributions, bug reports, and feature requests are welcome. Feel free to open an issue or submit a pull request.

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

neonet-0.2.2.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

neonet-0.2.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file neonet-0.2.2.tar.gz.

File metadata

  • Download URL: neonet-0.2.2.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for neonet-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b4511ad12a00c808696d125202a17ee2b9de084ef81934d0eb1d9544570429c6
MD5 8258d641531e5a1d5690d7964326d3b0
BLAKE2b-256 37345bec74873aa275a819d11664bed4ed9499e1f729f7a89afe8be7aab807f4

See more details on using hashes here.

File details

Details for the file neonet-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: neonet-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for neonet-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f52cdcba7fb3cc32d1a176be3090ff672fedca5141017e0822682ebdd068d09f
MD5 2802178eaff9134bc29094f0b95a6514
BLAKE2b-256 f6b06f52025b6c4a4a36243c467141a177eaca3a1f0ca05ce8312de7aaa51044

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