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.1.tar.gz (9.7 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.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neonet-0.2.1.tar.gz
  • Upload date:
  • Size: 9.7 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.1.tar.gz
Algorithm Hash digest
SHA256 81e3317783bf42ee1f2bca92965f5e7d2f648528296550bc5f70436df61880e7
MD5 c226d1249f118a632ceea01f5d764c73
BLAKE2b-256 fecb47096ca6a90b410bf61cb48971a325670197699efff2ec0e45008e8036f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neonet-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 444bcd7f0d2595b056a5681ec0be962037a7d87dc1b09e82e6e25862aa08d00f
MD5 59003fd520b4981951358294d3d0cc3f
BLAKE2b-256 860871e0408c003cb9ec9845417d4d1b95f4c3cc86c35e14c6d72f890db023ec

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