From 4a8f043e67e53b55899b760827a68d3fe46a655b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20B=C3=B6hm?= Date: Fri, 10 Jan 2025 14:21:06 +0100 Subject: [PATCH] Remove loss_name value and save loss adaptively Save it if it is a string, otherwise ignore --- tsimcne/tsimcne.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tsimcne/tsimcne.py b/tsimcne/tsimcne.py index d91c034..25fa6e6 100644 --- a/tsimcne/tsimcne.py +++ b/tsimcne/tsimcne.py @@ -36,7 +36,6 @@ def __init__( self, model=None, loss="infonce", - loss_name=None, metric=None, temperature=0.5, backbone="resnet18_sm_kernel", @@ -63,16 +62,15 @@ def __init__( ): super().__init__() ignore_list = [ - "loss", "backbone", "projection_head", "eval_function", "model", ] + ignore_list += ["loss"] if not isinstance(loss, str) else [] self.save_hyperparameters(ignore=ignore_list) self.model = model self.loss = loss - self.loss_name = self.loss if loss_name is None else loss_name self.metric = metric self.temperature = temperature self.backbone = backbone