facebookresearch / DomainBed

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

Bug in MixUp hyperparameter grid #120

Closed jpgard closed 1 year ago

jpgard commented 1 year ago

Hi, I'm not entirely sure if this is a bug, but noticed it and figured I'd file it and let the maintainers decide.

It looks like there is a bug in the hyperparameter grid for the MixUp model, where the "range" of the random selection is between 10^-1 and 10^-1 (effectively fixing the value of that hyperparameter):

https://github.com/facebookresearch/DomainBed/blob/2ed9edf781fe4b336c2fb6ffe7ca8a7c6f994422/domainbed/hparams_registry.py#L67

Specifically, I am referring to 10**r.uniform(-1, -1).

Is this an issue, or am I just misunderstanding how the code works?

lopezpaz commented 1 year ago

Seems like a bug indeed. The appendix in the DomainBed paper seems wrong as well. Looking at the original mixup paper, a reasonable grid would be 10**r.uniform(-1, +1). Mind sending a PR?