train - trains the network using a specified algorithm

### USAGE

        train [<num-updates>] [-report <report-interval> |
            -algorithm <algorithm> | -setOnly]

### DESCRIPTION

This will train the network on the current training set. Examples are selected based on the training set's example mode. The number of examples per weight update is determined by the network's batchSize parameter. A batchSize of 0 indicates that the batch size should be the number of examples in the training set.

If the num-updates is given, the network's numUpdates parameter will be set. This is the maximum number of weight updates, or batches, allowed during training. If not set, the network's previous value will be used.

The report-interval will set the network's reportInterval parameter, which is the number of weight updates between printing training reports. A report is always generated after the first and last updates.

Finally, an algorithm name may be specified. The available algorithms are steepest, momentum, dougsMomentum, and deltaBarDelta. deltaBarDelta is only available with the "advanced" version of Lens, `alens`. If not given, the previous algorithm is reused. dougsMomentum is the initial default.

If the -setOnly flag is used, no training will occur. However, the network's numUpdates, reportInterval, and default algorithm will be set. This can be used to set the default training behavior in an initialization script prior to actually training.

Training will stop if the total network error on a batch is less than or equal to the network's criterion parameter. Training will also stop if the unit criterion is achieved. For this to occur, the distance between each output unit's activation and its target must be smaller than a certain value at the end of every event in every example in the batch. The unit criterion for an output unit is given by its group's unitCriterion parameter.

If the net's output file is open, the output units' activations and targets will be recorded on each tick.

resetNet will randomize the weights, clear the momentum direction information, and otherwise get the network ready to start training from scratch.

### EXAMPLES

To train with delta-bar-delta for 1000 batches, printing a report every 100 updates:

        lens> train 1000 -r 100 -a deltaBarDelta

To do it again, just do:

        lens> train

### SEE ALSO

steepest, momentum, deltaBarDelta, updateWeights, test, resetNet, useTrainingSet, exampleSetMode, openNetOutputFile

Last modified: Fri Nov 17 12:35:20 EST 2000