def _get_loss_fn(metric): if metric in ("accuracy", "multiclass_f1"): return CrossEntropyLoss() elif metric == "multilabel_f1": return BCEWithLogitsLoss() else: raise NotImplementedError
def get_loss_fn(self): return CrossEntropyLoss()