T.matrix() only works if the data is a matrix, do model.get_input_space().make_batch_theano()