benanne/nntools — pull request #37 by dnouri (2014-09-18 16:05:26+00:00)
Title: mnist_conv.py example refactor

Following up on #35:

I removed the Bunch and made `train` a generator (so you could do early stopping or whatever yourself, in theory). Also converted `mnist_conv.py` to use the same pattern. `mnist_conv` is able to re-use the `create_iter_functions`, which seems good. Hope you still agree that it's easy enough to read as an example, even if there's dependencies from `mnist_conv` to `mnist` now.

It's a pity I wasn't able to reuse `load_data` as well, but the reshaping is what breaks it. (Wondering if this can benefit from the automatic reshaping in `DenseLayer`...)

Oh, and it looks like I found a little bug with MaxPool2DLayer.