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: optimizer.zero_grad() speed up option #927

Merged
merged 5 commits into from
Sep 4, 2020

Conversation

ditwoo
Copy link
Contributor

@ditwoo ditwoo commented Aug 31, 2020

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contribution guide?
  • Did you check the code style? catalyst-make-codestyle && catalyst-check-codestyle (pip install -U catalyst-codestyle).
  • Did you make sure to update the docs? We use Google format for all the methods and classes.
  • Did you check the docs with make check-docs?
  • Did you write any new necessary tests?
  • Did you add your new functionality to the docs?
  • Did you update the CHANGELOG?
  • You can use 'Login as guest' to see Teamcity build logs.

Description

Related Issue

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

@ditwoo ditwoo changed the title optimizer.param=None Feature: optimizer.zero_grad() speed up option Sep 1, 2020
Copy link
Contributor Author

@ditwoo ditwoo left a comment

Choose a reason for hiding this comment

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

@Scitator
Could you please suggest some fast (in terms of test speed) test to implement to check that loss function is decreased?
Or should i check gradients? What do you think?

catalyst/core/callbacks/optimizer.py Outdated Show resolved Hide resolved
Copy link
Member

@Scitator Scitator left a comment

Choose a reason for hiding this comment

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

1 tiny improvement and we are ready to merge :)

catalyst/core/callbacks/optimizer.py Outdated Show resolved Hide resolved
@mergify
Copy link

mergify bot commented Sep 3, 2020

This pull request is now in conflicts. @ditwoo, could you fix it? 🙏

@Scitator Scitator merged commit 40faab6 into catalyst-team:master Sep 4, 2020
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