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

Uploaded Python 3

File details

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

File metadata

  • Download URL: neonet-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 17a18dbce9b9fd20daa94d06ac58dbad042e172209ae309b0106bf1725b32af9
MD5 19e1143c70a9e2f80f5d8807e15baacc
BLAKE2b-256 fd8f55917ce99b7d176bf83f019e479a0d746b83c120bebe6b420f391839b10f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neonet-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9bf6c1880322e5344c223dfbceb8598991a5238cfb505ec34f7f43c19a25342a
MD5 f78e0b8cc4a9e01acbf6d7f9d91c89b7
BLAKE2b-256 dcb4d4dda81b0aac8a71ee0b4433af818b63b3cb53abad58728e4773fcbfafc1

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