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

Refactor cosine lr scheduler #6000

Merged
merged 11 commits into from
Aug 23, 2021
Merged

Conversation

wyg1997
Copy link
Contributor

@wyg1997 wyg1997 commented Aug 23, 2021

  • rename CosineAnnealingLR -> CosinDecayLR,对齐 lazy 的 CosineDecay 接口
  • 实现对齐 torch 的 CosineAnnealingLR 接口

image
image

@wyg1997 wyg1997 requested a review from strint August 23, 2021 04:37
@wyg1997 wyg1997 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 23, 2021 07:53
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 23, 2021 08:06
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 23, 2021 08:06
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 23, 2021 10:01
@github-actions
Copy link
Contributor

CI failed, removing label automerge

@wyg1997 wyg1997 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 23, 2021 10:13
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 23, 2021 10:50
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 139.7ms (= 6986.4ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.1ms (= 6404.6ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.09 (= 139.7ms / 128.1ms)

PyTorch resnet50 time: 82.0ms (= 4098.2ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.5ms (= 3723.4ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.10 (= 82.0ms / 74.5ms)

PyTorch resnet50 time: 57.6ms (= 2878.0ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 48.2ms (= 2407.8ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.20 (= 57.6ms / 48.2ms)

PyTorch resnet50 time: 48.8ms (= 2438.3ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 41.8ms (= 2090.9ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.17 (= 48.8ms / 41.8ms)

PyTorch resnet50 time: 40.0ms (= 1998.0ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 39.7ms (= 1984.5ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.01 (= 40.0ms / 39.7ms)

@oneflow-ci-bot oneflow-ci-bot merged commit 676c92c into master Aug 23, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the refactor-cosine_lr_scheduler branch August 23, 2021 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants