Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support model ema with EMAHook #201

Merged
merged 4 commits into from
Feb 7, 2023
Merged

Conversation

rentainhe
Copy link
Collaborator

@rentainhe rentainhe commented Feb 6, 2023

TODO

  • Support EMAHook as d2go.
  • Testing DINO-R50-4scale-12ep with ModelEMA: 49.4AP.

Note

If you set train.model_ema.enabled=True, after each eval_period, detrex will conduct two evalution on normal model and its ema version.

Usage

  • To enabled model ema training:
python tools/train_net.py --config-file projects/dino/configs/dino_r50_4scale_12ep.py \
                          --num-gpus 8 \
                          --resume \
                          train.model_ema.enabled=True \
  • Testing model with ema states when eval-only:
python tools/train_net.py --config-file projects/dino/configs/dino_r50_4scale_12ep.py \
                          --num-gpus 8 \
                          --resume \
                          train.model_ema.enabled=True \
                          train.model_ema.use_ema_weights_for_eval_only=True \

@rentainhe rentainhe changed the title Support EMAHook [Features] Support EMAHook Feb 6, 2023
@rentainhe rentainhe changed the title [Features] Support EMAHook [Features] Support model ema with EMAHook Feb 6, 2023
@rentainhe rentainhe changed the title [Features] Support model ema with EMAHook [Feature] Support model ema with EMAHook Feb 7, 2023
@rentainhe rentainhe merged commit 6ebb36d into main Feb 7, 2023
@rentainhe rentainhe deleted the support_model_ema branch February 7, 2023 17:36
Lontoone pushed a commit to Lontoone/detrex that referenced this pull request Jan 8, 2024
* add ema hook

* refine ema usage

* refine code

* update ema links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants