I am trying to train NN using pylearn2 I use stochastic gradient decent. I had always a message about failed GPU memory allocation in train->self.sgd_update(*batch) To fix it, I reduced size of the batch in yaml-config: batch_size: 200 was replaced by batch_size: 100