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.0.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.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neonet-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 0b7baa6ec7d8d8e5aa730dcb53103a06e1bcd3c6009dcd45c31339b66d337458
MD5 046517131d3a7c0d714b20c4317dcbd3
BLAKE2b-256 a9605e9a1aa10ffcc78ec22f2ecf56d77310799583e364c16bd222beb4b23c99

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neonet-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5a46daa154ce750620d36e4c2d4ab284bc0544a2533676f10c3a817bcd8c5e2
MD5 fd1ce130bb58ee3bbe0217040d092538
BLAKE2b-256 a217ab2edcf85f7a5017a09e39b9ab41a8cf86db5d9924de0e3a7c5182ac0cee

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