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, conv1d/2d, maxpooling1d/2d, flatten, embedding, batchnormalization, and more) 🧠
- 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.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b807af88d9101cfd6b19cd65c1e6d1dbc78574b8929418a4657da1cc52b1a3ad |
|
MD5 | 098b466b6d86db73510c7b12a0f36362 |
|
BLAKE2b-256 | bfa4097636fbbf0ceb24771cffe81764642347a6a66745cb1233add58ee59f58 |