'See parent class'

def get_cost(self, state_below, target=None, mask=None, temp=1, reg=None, scale=None, sum_over_time=False, no_noise_bias=False, additional_inputs=None, use_noise=True):

    class_probs = self.fprop(state_below, temp=temp, use_noise=use_noise, additional_inputs=additional_inputs, no_noise_bias=no_noise_bias)
    pvals = class_probs
    assert target, 'Computing    the    cost    requires    a    target'
    shape0 = class_probs.shape[0]
    shape1 = class_probs.shape[1]
    if (target.ndim > 1):
        target = target.flatten()
    assert (target.ndim == 1), 'make    sure    target    is    a    vector    of    ints'
    assert ('int' in target.dtype)
    pos = (TT.arange(shape0) * shape1)
    new_targ = (target + pos)
    cost = (- TT.log(class_probs.flatten()[new_targ]))
    if mask:
        cost = (cost * TT.cast(mask.flatten(), theano.config.floatX))
    if (sum_over_time is None):
        sum_over_time = self.sum_over_time
    if sum_over_time:
        if (state_below.ndim == 3):
            cost = cost.reshape((state_below.shape[0], state_below.shape[1]))
            self.cost = cost.mean(1).sum()
        else:
            self.cost = cost.sum()
    else:
        self.cost = cost.mean()
    if scale:
        self.cost = (self.cost * scale)
    if reg:
        self.cost = (self.cost + reg)
    self.out = self.cost
    self.mask = mask
    self.cost_scale = scale
    return self.cost
