facebookresearch / DomainBed

DomainBed is a suite to test domain generalization algorithms
MIT License
1.41k stars 299 forks source link

`Transfer` algorithm is missing function #107

Closed prockenschaub closed 2 years ago

prockenschaub commented 2 years ago

@Gordon-Guojun-Zhang the implementation of your Transfer algorithm in this repo currently results in the following error:

python -m domainbed.scripts.train --data_dir PATH_TO_MNIST --algorithm Transfer --dataset ColoredMNIST
#> NameError: name 'loss_gap' is not defined

The error originiates here as loss_gap does not exist in this DomainBed repo

https://github.com/facebookresearch/DomainBed/blob/2ed9edf781fe4b336c2fb6ffe7ca8a7c6f994422/domainbed/algorithms.py#L1839

I think it is missing this function from your forked repo:

https://github.com/Gordon-Guojun-Zhang/Transferability-NeurIPS2021/blob/86fba39cbe291c65e494236c2a2a3ccba5bee1cc/domainbed/algorithms.py#L364-L374

Gordon-Guojun-Zhang commented 2 years ago

Thanks for raising this issue. I have fixed it and submitted a PR. https://github.com/facebookresearch/DomainBed/pull/108