I added some unit tests, but this main part is kept for demonstrative purposes only. It is temporary. The idea is to show you how I intend to change the pylearn2.models.mlp.Layer subclasses, and to get your approval on this BEFORE I go about making a great many changes...