Some RBM functionality in Theano