Peter's modified pylearn2