Package: length-hpi
LENGTH - Lightning-fast Extensible Neural-network Guarding The HPIA simple neural network implementation that could be used for education.
But beware! Some important parts of the code are missing :wink: and you
have to fill the blanks!InstallationMake sure to installPython 3on your deviceWindows: Get ithereMac: Get ithereor use
your favourite package managerLinux: Use your favourite package manager i.e.pacman -S pythonorapt install python3Create a virtualenvironmentyou can do so withpython3 -m venv <path to virtualenv>If you are using Linux, we recommend that you installvirtualenvwrapperand organize all virtualenvironments with this tool, its quite neat.Load the virtualenvironmentClone the repositoryInstall all necessary libraries withpip install -r requirements.txtStructure of the RepositoryYou can find all neural network specific code in the directorylength.
Follows is a list of all directories and their respective content:data_setscontains code that is necessary for dealing with specific
datasets likeMNISTorFashionMNIST. Those implementations shall
follow the interface specification inlength/data_set.py.functionscontains code for all neural network functions that do not
have any parameters that need to be updated. All those functions follow
the interface specified inlength/function.py.initializerscontains code for weight initializers that follow the
initializer interface specified inlength/initializer.py.layerscontains code for all implemented neural network layers.
Those layers follow the interface specification inlength/layer.py. A
layer is a neural network function that has internal parameters, which
need to be updated.modelscontains code for sample models that come with this library
and can be trained out of the box.optimizerscontains the implementation of all neural network
optimizers. Those implementations follow the interface, specified inlength/optimizer.py.testscontains tests for the library, that usepy.testas testing
framework.The filetrain.pyin the root directory contains sample code for
training a neural network with this library.TrainingYou can start a train run, using the sample train script, by entering
the following command from the root directory of the repository:python train.py. If you want to know more about possible command-line
arguments, typepython train.py -h.Principles of this libraryThis library follows the design principles ofChainerin a very rudimentary way. This library
implements a dynamic computational graph that can be used to easily
prototype, design, and debug neural networks. It furthermore allows for
the design of dynamic neural networks that change at every iteration,
making such an approach suitable for recurrent neural networks.A word ofWARNING: If you ever feel tempted to use this library for
training a real neural network and not just a toy example:don't! Use a
library like Chainer that is more mature and also supports GPUs. The
transition from this library to Chainer should not be that difficult, as
the same principles are used here and in Chainer.ContributionsContributions in every form are welcome. If you think, that you nicely
implemented a new layer, we are happy to see your contribution in form
of a pull request!One Last ThingRemember:Do not use this library for training a real network.
This library is only intended to be used for education and not for real
prototyping.