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] Add layer decay optimizer constructor and learning rate decay optimizer constructor #1423

Merged
merged 4 commits into from
Jun 15, 2022

Conversation

jin-s13
Copy link
Collaborator

@jin-s13 jin-s13 commented Jun 11, 2022

Motivation

  1. Add layer decay optimizer constructor
  2. Add learning rate decay optimizer constructor
    These two optimizers will be used in BEiT, MAE, ViT, ConvNeXt backbones.

The codes are from mmsegmentation.

Related PRs: open-mmlab/mmsegmentation@f16bb06

Modification

  1. rename mmpose/core/optimizer --> mmpose/core/optimizers
  2. Add mmpose/core/optimizers/layer_decay_optimizer_constructor.py
  3. move tests/test_optimizer.py to tests/test_core/test_optimizer.py

BC-breaking (Optional)

Use cases (Optional)

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit tests to ensure correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.

@codecov
Copy link

codecov bot commented Jun 11, 2022

Codecov Report

Merging #1423 (6008dff) into master (fef003a) will increase coverage by 0.06%.
The diff coverage is 96.55%.

@@            Coverage Diff             @@
##           master    #1423      +/-   ##
==========================================
+ Coverage   84.35%   84.42%   +0.06%     
==========================================
  Files         232      233       +1     
  Lines       19279    19391     +112     
  Branches     3468     3500      +32     
==========================================
+ Hits        16262    16370     +108     
  Misses       2152     2152              
- Partials      865      869       +4     
Flag Coverage Δ
unittests 84.35% <96.55%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...re/optimizers/layer_decay_optimizer_constructor.py 96.11% <96.11%> (ø)
mmpose/core/__init__.py 100.00% <100.00%> (ø)
mmpose/core/optimizers/__init__.py 100.00% <100.00%> (ø)
mmpose/core/optimizers/builder.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51dba10...6008dff. Read the comment docs.

@jin-s13 jin-s13 requested a review from ly015 June 12, 2022 11:31
@ly015 ly015 changed the base branch from master to dev-0.28 June 12, 2022 15:16
@ly015 ly015 merged commit 76be975 into dev-0.28 Jun 15, 2022
@jin-s13 jin-s13 deleted the optimizers branch June 16, 2022 02:01
ly015 pushed a commit that referenced this pull request Jul 5, 2022
…ay optimizer constructor (#1423)

* add layer_decay_optimizer

* rename model

* fix mmdet to mmpose

* fix unittest
evendrow pushed a commit to evendrow/mmpose that referenced this pull request Dec 22, 2022
…ay optimizer constructor (open-mmlab#1423)

* add layer_decay_optimizer

* rename model

* fix mmdet to mmpose

* fix unittest
shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 5, 2023
…ay optimizer constructor (open-mmlab#1423)

* add layer_decay_optimizer

* rename model

* fix mmdet to mmpose

* fix unittest
ajgrafton pushed a commit to ajgrafton/mmpose that referenced this pull request Mar 6, 2024
…ay optimizer constructor (open-mmlab#1423)

* add layer_decay_optimizer

* rename model

* fix mmdet to mmpose

* fix unittest
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.

None yet

2 participants