benanne/Lasagne — pull request #81 by benanne (2014-12-26 12:49:56+00:00)
Title: split up lasagne.layers.base into submodules

In #68 we discussed splitting up `lasagne/layers/base.py` into multiple submodules because it's grown very large. I've followed @f0k's proposal, but I additionally split off `InputLayer` into an `input` submodule, in case we want to add more of those later.

I'm submitting this as a pull request since it's a big change that should be discussed and reviewed first.

Some remarks:
* `lasagne/layers/__init__.py` now imports all names from the submodules, including `cuda_convnet` and `corrmm`. However, `cuda_convnet` and `corrmm` are also imported as before, for backwards compatibility (else a lot of my code would break right now :p). I guess we can remove this pretty soon.

* The `helper` submodule currently imports `DenseLayer` and `InputLayer` just to make the doctests work (they aren't actually used in the code). I'm not sure if this is a good thing. When we add more doctests to various classes, this is going to lead to a lot of imports that are technically unused. Is there a better way to solve this problem?

* All tests pass, but considering our limited test coverage for now, this change might still break a bunch of things. I guess it's better to do this sooner rather than later :)