First stab at pylearn2 implementation