Skip to content

Latest commit

 

History

History
30 lines (28 loc) · 2.03 KB

README.md

File metadata and controls

30 lines (28 loc) · 2.03 KB

G2G

This is the Official PyTorch implemention of our ICASSP2024 paper "G2G: Generalized Learning by Cross-Domain Knowledge Transfer for Federated Domain Generalization".

G2G:Generalized Learning by Cross-Domain Knowledge Transfer for Federated Domain Generalization

Code to reproduce the experiments of G2G:Generalized Learning by Cross-Domain Knowledge Transfer for Federated Domain Generalization.

How to use it

  • Clone or download the repository

Install the requirement

pip install -r requirements.txt

Download VLCS, PACS and Office-Home datasets

Download Pre-trained models

Running ours on VLCS

python main_warm.py --node_num 3  --device cuda:0 --dataset vlcs --classes 5 --lr 0.0008 --global_model Alexnet --local_model Alexnet --algorithm fed_mutual --R 50 --E 7 --pretrained True --batch_size 64 --iteration 0 

Running ours on PACS

python main_warm.py --node_num 3  --device cuda:0 --dataset pacs --classes 7 --lr 0.0008 --global_model Alexnet --local_model Alexnet --algorithm fed_mutual --R 50 --E 7 --pretrained True --batch_size 32 --iteration 0 

Running ours on Office-Home

python main_warm.py --node_num 3 --device cuda:0 --dataset office-home --classes 65 --lr 0.0008 --global_model ResNet50 --local_model ResNet50 --algorithm fed_mutual --R 50 --E 7 --batch_size 32 --iteration 0