A simple convolutional neural network library with only numpy as dependency
Project description
Neuralnetlib
📝 Description
This is a handmade convolutional neural network library, made in python, using numpy as the only dependency.
I made it to challenge myself and to learn more about neural networks, how they work in depth.
The big part of this project was made in 4 hours and a half. The save and load features, and the binary classification support were added later.
Remember that this library is not optimized for performance, but for learning purposes (although I tried to make it as fast as possible).
I intend to improve the neural networks and add more features in the future.
📦 Features
- Many layers (input, activation, dense, dropout, conv2d, maxpooling2d, flatten) 🧠
- Many activation functions (sigmoid, tanh, relu, leaky relu, softmax, linear, elu, selu) 📈
- Many loss functions (mean squared error, mean absolute error, categorical crossentropy, binary crossentropy, huber loss) 📉
- Many optimizers (sgd, momentum, rmsprop, adam) 📊
- Supports binary classification, multiclass classification and regression 📖
- Save and load models 📁
- Simple to use 📚
⚙️ Installation
You can install the library using pip:
pip install neuralnetlib
💡 How to use
See this file for a simple example of how to use the library. For a more advanced example, see this file.
More examples in this folder.
You are free to tweak the hyperparameters and the network architecture to see how it affects the results.
I used the MNIST dataset to test the library, but you can use any dataset you want.
📜 Output of the example file
Here is an example of a model training on the mnist using the library
Here is an example of a loaded model used with Tkinter:
Here, I decided to print the first 10 predictions and their respective labels to see how the network is performing.
You can of course use the library for any dataset you want.
✍️ Authors
- Marc Pinet - Initial work - marcpinet
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for neuralnetlib-2.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7a8851ddfe15958c1c184772715d127c1d774286e0bf6901aa695d27342818e |
|
MD5 | a9ec584367c315a3d9870b84a313e2ee |
|
BLAKE2b-256 | 7e280e8a5995495040bfaa9e3b9102a84c7a9dcc34e93ace4395c3c661476c36 |