def METHOD_NAME(self, c: Coqpit, num_classes=None):
    if c.loss == "ge2e":
        criterion = GE2ELoss(loss_method="softmax")
    elif c.loss == "angleproto":
        criterion = AngleProtoLoss()
    elif c.loss == "softmaxproto":
        criterion = SoftmaxAngleProtoLoss(c.model_params["proj_dim"], num_classes)
    else:
        raise Exception("The %s  not is a loss supported" % c.loss)
    return criterion