moved a bunch of MP-DBM functionality into pylearn2 from private repo