'Return a float representing the number of errors in the minibatch ;
zero one loss over the size of the minibatch
:type y: theano.tensor.TensorType
:param y: corresponds to a vector that gives for each example the
correct label'

def errors(self, y):

    if (y.ndim != self.y_pred.ndim):
        raise TypeError('y    should    have    the    same    shape    as    self.y_pred', ('y', target.type, 'y_pred', self.y_pred.type))
    if y.dtype.startswith('int'):
        return T.mean(T.neq(self.y_pred, y))
    else:
        raise NotImplementedError()
