Theano mcode modifications.