Skip to content

2.3 Training File Format

Nick Oppen edited this page Nov 25, 2013 · 1 revision

Training File Format

To train a network you need to present it a training set. This contains the set of know pre-classified examples of inputs to the network and the outputs that the trainer wants to see from the network given the input. The number of input/ouput vectors depends on the complexity of the network.

The format of a training set is as follows:

  • One Network Topology Clause
  • Many Input-Output Vector clauses defineing the input and desired output from the given output
The default file extension for a training file is “*.tr”. The file however is an ordinary text file that you can create with any text editor.

The Network Topology Clause

The network topology clause has the format:

networkTopology(<number of input nodes>,<number of hidden nodes>,<number of output nodes>)

where

<number of input nodes> is an unsigned integer

<number of hidden nodes> is an unsigned integer

<number of output nodes> is an unsigned integer

e.g.

networkTopology(3,2,2)

defines a network with three input nodes, two hidden nodes and 2 output nodes.

The Input/OutputVector Clause

The inputOutputVector clause has the following format:

inputOutputVector(<input values>;<output values>)

where

<input values> is a comma separated list of floating point numbers

<output values> is a comma separated list of floating point numbers

e.g.

inputOutputVector(1.0,1.5,1.5;0.0,1.0)

The number of input values in the <input values> list must match the number of input nodes in the network topology clause. Similarly the number of values in the <output values> list must match the number of ouput nodes in the network topology clause. (The number of hidden nodes is irrelevant.)

The top part of the file will look like this:

networkTopology(3,2,2)

inputOutputVector(1,1,1;0,0)

inputOutputVector(0,1,1;0,0)

inputOutputVector(1,0,1;0,0)