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

[AMP] For amp.decorate() optimizers set to None is ok #37541

Merged
merged 4 commits into from
Nov 29, 2021

Conversation

zhangbo9674
Copy link
Contributor

PR types

New features

PR changes

APIs

Describe

For amp-02, origin paddle.amp.decorate(), input param optimizershould not be None, now support optimizer to be None.
Example:

  • before:
    model, optimizer = paddle.amp.decorate(models=model, optimizers=optimizer)

  • now:
    model = paddle.amp.decorate(models=model, optimizers=None)

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@zhangbo9674 zhangbo9674 changed the title [AMP] For amp.decorate() optimizers set to None is ok [AMP] For amp.decorate() optimizers set to None is ok Nov 25, 2021
zhiqiu
zhiqiu previously approved these changes Nov 26, 2021
Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz update the docs.

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhiqiu zhiqiu merged commit 2bb3f0b into PaddlePaddle:develop Nov 29, 2021
Zjq9409 pushed a commit to Zjq9409/Paddle that referenced this pull request Dec 10, 2021
…#37541)

* amp.decorate optimizers set to None is ok

* refine unittest

* add unittest and refine example code

* refine unittest
@zhangbo9674 zhangbo9674 deleted the dev/refine_purefp16_decorate branch March 2, 2023 02:57
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.

3 participants