mariodoebler / test-time-adaptation

A repository and benchmark for online test-time adaptation.
MIT License
188 stars 16 forks source link

Can not find conf_thresh=cfg.GTTA.CONF_THRESH when run GTTA segmentation experiment #20

Closed NEWER100 closed 2 weeks ago

NEWER100 commented 2 weeks ago
gtta_model = GTTA(model, optimizer,
                  crop_size=cfg.SOURCE.CROP_SIZE,
                  steps=cfg.OPTIM.STEPS,
                  episodic=cfg.MODEL.EPISODIC,
                  adain_model=adain_model,
                  src_loader=src_loader,
                  adain_loader=adain_src_loader,
                  steps_adain=cfg.GTTA.STEPS_ADAIN,
                  device=device,
                  save_dir=cfg.SAVE_DIR,
                  lambda_ce_trg=cfg.GTTA.LAMBDA_CE_TRG,
                  num_classes=cfg.MODEL.NUM_CLASSES,
                  ignore_label=cfg.OPTIM.IGNORE_LABEL,
                  **conf_thresh=cfg.GTTA.CONF_THRESH,**
                  class_weighting=cfg.GTTA.USE_CLASS_WEIGHTING,
                  style_transfer=cfg.GTTA.USE_STYLE_TRANSFER)

Traceback (most recent call last): File "/data/hlr/TTA/segmentation/test_time.py", line 271, in main("Evaluation.") File "/data/hlr/TTA/segmentation/test_time.py", line 83, in main model = setup_gtta(base_model, device) File "/data/hlr/TTA/segmentation/test_time.py", line 227, in setup_gtta conf_thresh=cfg.GTTA.CONF_THRESH, File "/data/hlr/.conda/envs/py39/lib/python3.9/site-packages/yacs/config.py", line 141, in getattr raise AttributeError(name) AttributeError: CONF_THRESH

mariodoebler commented 2 weeks ago

Thanks for pointing that out. Code is updated.

NEWER100 commented 2 weeks ago

OK,new code have solved this problem