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.1.2.tar.gz (9.5 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.1.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for neonet-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9620091f9e784cb573dda64fdb44c56daf10f23a9d1bce7dc4bdecc3fb8e2095
MD5 7d4ea344a40402bd76582495fea6b011
BLAKE2b-256 258ea5b5e2854c605e3026458d13c07bbb1b0610ca1c850b85c8efb8be7840d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neonet-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b8938484ce3ea5b50d8ad770ed105a7e79f7ab0a82b1a2b6499f7f473688f406
MD5 b4f3196b1c0e5f32c01713f52d749a76
BLAKE2b-256 1761bdd0649c338fbff58487133c2d69a033ef25e52c0328cfdb7cf4add86c44

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