GithubHelp home page GithubHelp logo

mediabrain-sjtu / disam Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 10.91 MB

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

Python 100.00%

disam's Introduction

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.

disam's People

Contributors

frankzhangrp avatar

Stargazers

Ethan Chen avatar  avatar SuHui avatar Feng Hong avatar  avatar  avatar

Watchers

 avatar

disam's Issues

dataset

Great work indeed. I'm a beginner in this field, and I've encountered an issue. I noticed that the downloaded dataset is inconsistent with the data/*dataset.py file, such as missing "{self.domain_name}{split_dict[self.split]}_kfold' + '.txt'" for PACS dataset. If possible, could you please provide a download link for the dataset?

Can DISAM be applied in federated learning scenarios?

Thanks for the splendid work, I am very admirable。

  1. The different domains mentioned in the paper are similar to the non-IID problem scenarios in federated learning. Is this an application direction of DISAM?
  2. In addition, can DISAM be used in one-domain datasets such as MNIST, CIFAR, and ImageNet?

Sorry for my ignorance in the field of domain generalization. Thank you very much for taking the time to address my confusion.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.