Giter Club home page Giter Club logo

basicneuralnetwork's Introduction

Basic Neural Network

A simple python implementation of a neural network for learning about the subject.

The project is made up of five important files

  • train.py — Create and train a neural network
  • test.py — Test the error rate of a neural network created with train.py
  • neuralnetwork.py — The NeuralNetwork class implementation.
  • activation_functions.py — A dict with the different activation functions, and their derivatives, that can be used in the nueral networks.
  • utils.py — Miscellaneous functions utilized by other processes.

Train.py and Test.py have optional command line arguments listed below

train.py

usage: train.py [-h] [-hn HN] [-a A] [-lr LR] [-t T] [-g] [-n N]

Train a Neural Network on the mnist dataset.

optional arguments:
  -h, --help  show this help message and exit
  -hn HN      The number of hidden nodes to use. (Default: 700)
  -a A        The activation function to use. Sigmoid, Tanh, ReLU. (Default: Sigmoid)
  -lr LR      The learning rate. Must be within the exclusive range (0, 1). (Default: 0.05)
  -t T        The number of images used to train the model in the range (0, 60000]. (Default: 30000)
  -g          Flag to graph the training over time. (This will add significant time to training)
  -n N        Filename, not including extension. (Default: model)

test.py

usage: test.py [-h] [-t T] [-f F]

Test a Neural Network created with train.py

optional arguments:
  -h, --help  show this help message and exit
  -t T        The number of images used to test the model in the range (0, 10000]. (Default: 1000)
  -f F        Filename of model to test, not including extension. (Default: model)

basicneuralnetwork's People

Watchers

James Cloos avatar Zach Elkins avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.