Merge upstream changes from lisa-lab/pylearn2