MaxTrainingRounds

MaxTrainingRounds

is an option for NetTrain and related functions that specifies the maximum number of rounds of training to do.

Details

  • A training round or "epoch" typically visits each training example once.
  • The following settings for MaxTrainingRounds can be given:
  • Automatictrain for approximately 20 seconds (default)
    ntrain for the given number of rounds, where a round is a traversal of the entire dataset
    Quantity[r,"unit"]train for a specific number of seconds, minutes or hours
  • With the default specification MaxTrainingRounds->Automatic, the number of training rounds to use is calculated based on the time taken to evaluate one batch of examples and will typically train for less than a minute on networks with fewer than 1000 weight parameters. For nets that operate on variable-length inputs, the chosen value can vary substantially.
  • MaxTrainingRounds->Automatic will never train for less than 10 rounds or more than 10,000 rounds.

Examples

Basic Examples  (1)

Train a network such that it visits each example exactly once:

In[1]:=
Click for copyable input
Out[1]=

Train a network for approximately 5 seconds:

In[2]:=
Click for copyable input
Out[2]=

See Also

NetTrain  ValidationSet  BatchSize

Introduced in 2016
(11.0)