'Return the mean of the negative log-likelihood of the prediction
of this model under a given target distribution.
.. math::
rac{1}{|\mathcal{D}|} \mathcal{L} (        heta=\{W,b\}, \mathcal{D}) =
rac{1}{|\mathcal{D}|} \sum_{i=0}^{|\mathcal{D}|} \log(P(Y=y^{(i)}|x^{(i)}, W,b)) \
\ell (      heta=\{W,b\}, \mathcal{D})
:type y: theano.tensor.TensorType
:param y: corresponds to a vector that gives for each example the
correct label
Note: we use the mean instead of the sum so that
the learning rate is less dependent on the batch size'

def negative_log_likelihood(self, y):

    return (- T.mean(T.log(self.p_y_given_x)[(T.arange(y.shape[0]), y)]))
