From 4a0553f268e057d6e4a4f6339030140f91d38340 Mon Sep 17 00:00:00 2001 From: MendelXu Date: Mon, 29 Nov 2021 14:32:18 +0800 Subject: [PATCH 1/2] permit to log visualization result to disk --- ssod/utils/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssod/utils/logger.py b/ssod/utils/logger.py index c10e294..d4e050b 100644 --- a/ssod/utils/logger.py +++ b/ssod/utils/logger.py @@ -109,7 +109,7 @@ def log_image_with_boxes( if not (interval == 1 or _log_counter[key] % interval == 1): return if backend == "auto": - if wandb is None: + if (wandb is None) or (wandb.run is None): backend = "file" else: backend = "wandb" From 70f6989fce6303bf472b73fc72955ced8a21b975 Mon Sep 17 00:00:00 2001 From: MendelXu Date: Mon, 29 Nov 2021 14:32:40 +0800 Subject: [PATCH 2/2] permit to test with parsed config files --- tools/test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/test.py b/tools/test.py index f09e298..a36971e 100644 --- a/tools/test.py +++ b/tools/test.py @@ -140,8 +140,9 @@ def main(): # set cudnn_benchmark if cfg.get("cudnn_benchmark", False): torch.backends.cudnn.benchmark = True - - cfg.model.pretrained = None + # fix issue mentioned in https://github.com/microsoft/SoftTeacher/issues/111 + if "pretrained" in cfg.model: + cfg.model.pretrained = None if cfg.model.get("neck"): if isinstance(cfg.model.neck, list): for neck_cfg in cfg.model.neck: