lisa-lab/pylearn2 — pull request #392 by lightcatcher (2013-07-11 18:45:08+00:00)
Title: (Unsupervised) Generative Stochastic Network (GSN) model

This PR includes all of the code for working (unsupervised) GSN's.

The main contributions are:
**pylearn2.models.gsn.GSN** : This is the actual model class. It is heavily reliant on pylearn2.models.autoencoder.Autoencoder.

**pylearn2.costs.gsn.GSNCost** : cost class for the model

**pylearn2.models.tests.test_gsn** : driver for GSN testing and sampling. Also serves as tests and example.

**pylearn2.distributions.parzen** : code for Parzen estimator, which is useful to evaluate sampling algorithms. This code is pretty much directly copied from https://github.com/yaoli/DSN (the original implementation of GSNs)

**functions in pylearn2.utils.image** : Makes it easy to create images such as http://i.imgur.com/EvlEvBW.png . Again, this code was directly copied from the original GSN's implementation.

**several new corruptors in pylearn2.corruption** : Particularly, I added the SaltPepperCorruptor, BinomialSampler, MultinomialSampler, and ComposedCorruptor (which just composes corruptors).

**NOTE**: I did slightly change the corruptor interface (modifying what a private method does). Previously, _corrupt had to handle both single tensor objects or list of tensor objects (by mapping over them). This was a bit ugly because every Corruptor subclass included this logic in _corrupt. I changed this so that _corrupt only operates on a single tensor, and __call__ (defined only on the Corruptor base class) handles the mapping of lists. This could theoretically break something, but from ack'ing around the codebase I didn't see anything this would break. Does pylearn2 have a test suite that should be run before merging this in? As far as I know, this is the only change that could break things.