thanks for your reply. yes, I am trying to calculate the soft_loss but stuck in this problem and don’t know what to do.
metrics
        x, y = output.detach().cpu().numpy(), y.detach().cpu().numpy()
        soft_score = soft_loss(y, x, beta=0.95)


def soft_loss(y_true, y_pred, beta=0.95):
cross_entropy = F.nll_loss(y_pred.log(), y_true, size_average=False)
soft_reed = -y_pred * torch.log(y_pred + 1e-8)
return beta * cross_entropy + (1 - beta) * torch.sum(soft_reed)