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, 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 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.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2336c957d0f7a4ce3a9ebb5f450233425f23ccfdccc95af2910a173fc81ad777 |
|
MD5 | 2bf55527b829d0b097be58e72ee450df |
|
BLAKE2b-256 | e1099ee840de4c5a4deb5c20585fac542570003ec70e894c604a643b25b7ef4f |