lisa-lab/pylearn2 — pull request #1090 by madisonmay (2014-08-22 06:14:15+00:00)
Title: Fix for #1078

Should resolve issue #1078.

While digging around the tests, I also found a bit of odd behavior. The tests seem to allow one extra epoch of training on a model that has already reached max_epochs.

> # Try training while already reached max_epochs, should stop after 1 epoch
> # on first continue_learning() call

From `pylearn2/termination_criteria/tests/test_init.py`:

```
# Try training while already reached max_epochs, should stop after 1 epoch
# on first continue_learning() call
train_obj = produce_train_obj(new_epochs=False, model=train_obj.model)
train_obj.main_loop()
test_epochs(train_obj.model.monitor.get_epochs_seen(), N+1)
```

Is that behavior desirable?