View on GitHub

NumPyNet

Neural Networks library in pure numpy

Author Project Documentation Build Status Code Quality Coverage
N. Curti
M. Ceccarelli
NumPyNet docs Linux/MacOS : travis
Windows : appveyor
Codacy : Codacy Badge
Codebeat : Codebeat
codecov

GitHub pull-requests GitHub issues

GitHub stars GitHub watchers

</a>

Neural Networks in Pure NumPy - NumPyNet

Implementation in pure Numpy of neural networks models. NumPyNet supports a syntax very close to the Keras one but it is written using only Numpy functions: in this way it is very light and fast to install and use/modify.

Table of Contents

  1. Introduction
  2. Layers
  3. Installation
  4. Contributions
  5. References
  6. Authors
  7. License
  8. Acknowledgment
  9. Citation

Introduction

TODO: Insert here introduction about neural network models starting from the Simple Perceptron model provided here

Layers are the main core of a Neural Network model: every one of them performs, on its respective input, a different operation. The concatenation of multiple Layer forms a CNN, where for concatenation we mean that the output of a layer becomes the input of the next one.

In the NumPyNet framework a Layer is a python class, this allows the users to instantiate an object of the chosen type and call one of its methods.

Main Method:

Layers

Some texts for introduction:

Installation

Python version supported : Python version

First of all ensure that a right Python version is installed (Python >= 2.7 is required). The Anaconda/Miniconda python version is recommended.

Note: some utilities (e.g image and video objects) required OpenCV library. OpenCV does not support Python2.6 and Python3.3. If you are working with these two versions, please consider to remove the utilities objects or simply convert the OpenCV dependencies with other packages (like Pillow or scikit-image).

Download the project or the latest release:

git clone https://github.com/Nico-Curti/NumPyNet
cd NumPyNet

The principal NumPyNet requirements are numpy, matplotlib, enum34 and configparser. For layer visualizations we use the Pillow package while the OpenCV library is used to wrap some useful image processing objects. You can simply install the full list of requirements with the command:

pip install -r ./requirements.txt

The testing procedure of this library is performed using PyTest and Hypothesis packages. Please consider to install also these libraries if you want a complete installation of NumPyNet.

In the NumPyNet directory execute:

python setup.py install

or for installing in development mode:

python setup.py develop --user

Testing

A full set of testing functions is provided in the testing directory. The tests are performed against the Keras implementation of the same functions (we tested only the Tensorflow backend in our simulations). You can run the full list of tests with:

cd NumPyNet/testing
pytest

The continuous integration using Travis and Appveyor tests each function in every commit, thus pay attention to the status badges before use this package or use the latest stable version available.

Contribution

Any contribution is more than welcome :heart:. Just fill an issue or a pull request and we will check ASAP!

See here for further informations about how to contribute with this project.

References

1- Travis Oliphant. "NumPy: A guide to NumPy", USA: Trelgol Publishing, 2006.
2- Bradski, G. "The OpenCV Library", Dr. Dobb's Journal of Software Tools, 2000.

TODO

Authors

See also the list of contributors GitHub contributors who participated in this project.

License

The NumPyNet package is licensed under the MIT “Expat” License. License

Acknowledgment

Thanks goes to all contributors of this project.

Citation

If you have found NumPyNet helpful in your research, please consider citing this project repository

@misc{NumPyNet,
  author = {Curti, Nico and Ceccarelli, Mattia},
  title = {NumPyNet},
  year = {2019},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Nico-Curti/NumPyNet}},
}