• Stars
    star
    286
  • Rank 143,805 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GMoE could be the next backbone model for many kinds of generalization task.

Welcome to Generalizable Mixture-of-Experts for Domain Generalization

🔥 Our paper Sparse Mixture-of-Experts are Domain Generalizable Learners has officially been accepted as ICLR 2023 for Oral presentation.

🔥 GMoE-S/16 model currently ranks top place among multiple DG datasets without extra pre-training data. (Our GMoE-S/16 is initilized from DeiT-S/16, which was only pretrained on ImageNet-1K 2012)

Wondering why GMoEs have astonishing performance? 🤯 Let's investigate the generalization ability of model architecture itself and see the great potentials of Sparse Mixture-of-Experts (MoE) architecture.

Preparation

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116

python3 -m pip uninstall tutel -y
python3 -m pip install --user --upgrade git+https://github.com/microsoft/tutel@main

pip3 install -r requirements.txt

Datasets

python3 -m domainbed.scripts.download \
       --data_dir=./domainbed/data

Environments

Environment details used in paper for the main experiments on Nvidia V100 GPU.

Environment:
	Python: 3.9.12
	PyTorch: 1.12.0+cu116
	Torchvision: 0.13.0+cu116
	CUDA: 11.6
	CUDNN: 8302
	NumPy: 1.19.5
	PIL: 9.2.0

Start Training

Train a model:

python3 -m domainbed.scripts.train\
       --data_dir=./domainbed/data/OfficeHome/\
       --algorithm GMOE\
       --dataset OfficeHome\
       --test_env 2

Hyper-params

We put hparams for each dataset into

./domainbed/hparams_registry.py

Basically, you just need to choose --algorithm and --dataset. The optimal hparams will be loaded accordingly.

License

This source code is released under the MIT license, included here.

Acknowledgement

The MoE module is built on Tutel MoE.

More Repositories

1

Otter

🦦 Otter, a multi-modal model based on OpenFlamingo (open-sourced version of DeepMind's Flamingo), trained on MIMIC-IT and showcasing improved instruction-following and in-context learning ability.
Python
3,543
star
2

RelateAnything

Relate Anything Model is capable of taking an image as input and utilizing SAM to identify the corresponding mask within the image.
Python
438
star
3

MADAN

Pytorch Code release for our NeurIPS paper "Multi-source Domain Adaptation for Semantic Segmentation"
Python
168
star
4

Learning-Invariant-Representations-and-Risks

Pytorch code release of CVPR 21 Paper: Learning Invariant Representations and Risks
Python
32
star
5

Mapillary2COCO

Transfer Mapillary Vistas Dataset to Coco format
Python
29
star
6

GenBench

Benchmarking and Analyzing Generative Data for Visual Recognition
Python
25
star
7

Time-Series-Analysis

2017-Summer-Term-Study
22
star
8

IIB

Python
15
star
9

Data-Structure

Data structure and Algorithm
C++
8
star
10

Higher-Cloud-Computing-Project

We are devoting to building a cloud computing platform that leverages idle resources based on mobile or local networks
Java
5
star
11

Shared-Route

New way to explore your campus life.
Java
4
star
12

VisualizeUrText

Lab1-Pair_Programming
Java
3
star
13

HCCP-Patronus

This is an explosive start-up idea bounced out of my mind I was doing my course project. I am not sure when I can achieve them, but he will be sticked there to remind me his existence.
Java
3
star
14

HighPrecisionDetection

Do some experiments
Python
1
star
15

learn_to_crawl

HTML
1
star
16

Codeforces

C++
1
star
17

luodian-LAB-4

Just for SE assignment
Java
1
star
18

Network_Alignment

Task from a UCI professor
C++
1
star
19

Pytorch_Quick_Practices

Practices to quick get into pytorch
Python
1
star
20

GO_Kitti

Currently doing KITTI challenge.
Python
1
star
21

LeetCode

Record my way to improve my coding ability towards algorithms and data structures. Helping me build a solid foundation on the road of scientific research.
C++
1
star
22

Code-contest

C++
1
star
23

Unet-TGS-Salt-Challenge

TGS Salt Identification Challenge
Python
1
star
24

Analysis-WindMachine-Data

Python
1
star
25

I-Love-Study

This is an android app made by WD.Hao and L.Bo
Java
1
star
26

HCCP-Distributed-Download

第一款HCCP上的应用
Java
1
star
27

Patricia

wdh && lb
C++
1
star
28

HIT-OS

实验代码大部分借鉴前人火炬,但是ppt做的很详细,可以一看
C
1
star
29

Machine-Learning-Ng

Ng's public courses in cousera
1
star
30

What-Do-You-Like

First web app
JavaScript
1
star