lmjohns3 / theanets

Neural network toolkit for Python
http://theanets.rtfd.org
MIT License
328 stars 73 forks source link

Number of Iterations #17

Closed kadarakos closed 10 years ago

kadarakos commented 10 years ago

Can set the number of iterations? or number of maximum iterations/epochs?

lmjohns3 commented 10 years ago

Use the --num-updates command-line flag when running your program, or pass num_updates=K when you construct your trainer.

fedorajzf commented 9 years ago

where to set num_updates ?

lmjohns3 commented 9 years ago

This --num-updates solution is quite old at this point.

To set the number of iterations to N, you'll need to do some acrobatics with the early stopping criteria:

patience=0,
validate_every=N,
min_improvement=0.999,

This will ensure that the first validation attempt will fail, and the first failed validation attempt will exhaust the patience of the early stopping mechanism.

You can read more about early stopping at http://downhill.readthedocs.org/en/stable/guide.html#patience-and-improvement