Skip to content
Snippets Groups Projects
Select Git revision
  • dacaf7100b422c8d7f8effd75704d649bec19cb6
  • main default protected
2 results

neural_networks_101

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Nando Farchmin authored
    dacaf710
    History

    Description

    This repository provides simple scripts and examples to demonstrate how neural networks (NN) and machine learning (ML) in general can be used for tasks like image recognition or general function approximation.

    Installation and Setup

    To execute the code provided in this repository, you need a python3 environment with the following packages installed: numpy, scipy, pytorch, matplotlib. Probably the easiest way is using Anaconda. The required libraries can then be installed with

    pip install -r requirements.txt

    You also need to add the source code to your python path to make the modules of this repository visible to your python environment. You can do so bei either setting the $PYTHONPATH variable temporarily by typing export PYTHONPATH="/home/.../neural_networks_101/:$PYTHONPATH") in your terminal or by adding it to your .bashrc with

    echo "export PYTHONPATH=/home/.../neural_networks_101/:$PYTHONPATH" >> ~/.bashrc

    where /home/.../ has to be changed to the path this repository is located in.

    Usage

    The basic theory behind neural networks is explained in docs/basisc.md. Here you can find some additional references and links to get you going on your in-depth neural network adventure as well.

    Besides the theory, I added some scripts to give you a basic coding structure and show you how to employ neural networks with PyTorch. The following table gives you an overview of the scripts and what they do.

    File Description
    app/function_approximation.py A simple benchmark on how to approximate a 2D sine function with a neural network, broken down to a few simple steps. The code used for the steps can be found in src/approximation.py.
    app/mnist_image_classification.py A simple benchmark for image classification using the MNIST data set. The code used for the steps can be found in src/mnist.py.

    License

    This software runs under the GNU General Public License 3.0.