lisa-lab/pylearn2 — pull request #978 by bartvm (2014-06-11 15:57:49+00:00)
Title: Multiple inputs for MLP

A few people have asked me how to use the new `CompositeLayer` functionality to feed multiple inputs to an MLP (e.g. @axeldavy).

This was a bit complicated because the `MLP` class doesn't allow `input_source` to be passed (it is hardcoded to be `features` in the `Model` base class). Also, the (very badly named) `VectorSpacesDataset` was very outdated, calling some methods that don't exist anymore (e.g. `Space.validate`), and not implementing other methods that were required by the `FiniteDatasetIterator` (`get_data_specs` and `get_num_examples`) or the SGD algorithm (`return_tuple` argument to `iterator` method).

This PR should allow `input_source` to be passed to an MLP, and make the `VectorSpacesDataset` functional again (enough for basic use at least). I added a unit test as well.