lisa-lab/pylearn2 — pull request #1131 by bartvm (2014-09-07 22:34:57+00:00)
Title: WIP: DAG support

Initial suggestion on how to support more general DAG structures for neural networks. The code might be a bit messy, but the idea works. The syntax works is as follows right this now:

```python
from pylearn2.models.mlp import NeuralNet, Softmax, Tanh

# Simple MLP
nn = NeuralNet(layers=[Tanh(layer_name='h', dim=20, irange=0.1),
Softmax(layer_name='y', n_classes=10, irange=0.1)],
nvis=30)

# Shortcut from input to last layer
nn = NeuralNet(layers=[Tanh(layer_name='h', dim=20, irange=0.1),
Softmax(layer_name='y', n_classes=10, irange=0.1)],
inputs={'y': ['h', 'features']},
nvis=30)
```