Skip to content

Commit

Permalink
Merge pull request #124 from MendelXu/main
Browse files Browse the repository at this point in the history
Fix two issues
  • Loading branch information
MendelXu authored Nov 29, 2021
2 parents 97064fb + 70f6989 commit bef9a25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ssod/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bef9a25

Please sign in to comment.