def _cost(self, final_acts, y):
        exp_act = safe_exp(final_acts)
        lse_act = safe_log(np.sum(exp_act, axis=1))
        return -np.mean(np.sum((y * (final_acts - lse_act[:,np.newaxis])), axis=1))
dataset/ETHPy150Open bbabenko/simple_convnet/simple_convnet/convnet.py/SoftmaxNet._cost/original