Add `iter` parameter

Allows specifying the number of iterations (epochs) one wants to use.