MediaBrain-SJTU / DISAM

This repository contains the implementation details for the paper "Domain-Inspired Sharpness-Aware Minimization Under Domain Shifts," accepted at the ICLR 2024.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Domain-Inspired Sharpness-Aware Minimization Under Domain Shifts

This repository contains the implementation details for the paper "Domain-Inspired Sharpness-Aware Minimization Under Domain Shifts," accepted at the International Conference on Learning Representations (ICLR) 2024.

poster image

Environment Requirements

Language

Python PyTorch NumPy

Usage

Dataset repo

You need to download the dataset on your own and specify the dataset path in the code/configs/default.py file. Please refer to Domainbed repo.

Algorithm

The core operations of the algorithm are implemented in the code/algorithms/DISAM.py file.

Example Run Command

bash ./runs/run_trainer.py --algorithm DISAM_Trainer --dataset pacs --test_domain p --lambda_weight 0.1 --rho 0.05 --lr 1e-3 --batch_size 32 --epoch 50

Citation

If you find our work useful in your research, please consider citing:

@inproceedings{zhang2024domaininspired,
  title={Domain-Inspired Sharpness Aware Minimization Under Domain Shifts},
  author={Ruipeng Zhang and Ziqing Fan and Jiangchao Yao and Ya Zhang and Yanfeng Wang},
  booktitle={The Twelfth International Conference on Learning Representations},
  year={2024},
  url={https://openreview.net/forum?id=I4wB3HA3dJ}
}

License

License

This project is licensed under the MIT License.

About

This repository contains the implementation details for the paper "Domain-Inspired Sharpness-Aware Minimization Under Domain Shifts," accepted at the ICLR 2024.


Languages

Language:Python 100.0%