examples.dlife.nn.adder
Class TrainBinaryAdder

java.lang.Object
  extended by examples.dlife.nn.adder.TrainBinaryAdder

public class TrainBinaryAdder
extends Object

Create, train and serialize (save) a neural network for adding two 2-bit unsigned binary numbers. A 3-layer back-propagation neural network is trained to perform unsigned binary addition. The inputs to the network are two 2-bit unsigned binary integers. The output of the network is a 3-bit unsigned binary number indicating the sum of the inputs. The network is trained until it can perform perfectly on the training data provided in the "trainingData.txt" file. The trained neural network is serialized to the file "adderNetwork.bin" and is then used by the other two sample programs to evaluate the network performance and to use the trained network.

To run this example double click the dLifeDist/UserScripts/RunExample file (Mac/Linux) or the dLifeDist/UserScripts/RunExample.bat file (Windows) and enter the example name:

The source code for this class is contained in the file:

Version:
Feb 9, 2007
Author:
Grant Braught, Dickinson College
See Also:
FFBPNeuralNetwork, NNDataSet

Constructor Summary
TrainBinaryAdder()
           
 
Method Summary
static void main(String[] args)
          Create, train and save a network that performs 2-bit unsigned binary addition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrainBinaryAdder

public TrainBinaryAdder()
Method Detail

main

public static void main(String[] args)
Create, train and save a network that performs 2-bit unsigned binary addition.

Parameters:
args - none.