-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Add Rematerialization to Keras #20743
base: master
Are you sure you want to change the base?
Add Rematerialization to Keras #20743
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20743 +/- ##
==========================================
- Coverage 82.01% 72.13% -9.88%
==========================================
Files 557 558 +1
Lines 52016 52106 +90
Branches 8037 8056 +19
==========================================
- Hits 42659 37587 -5072
- Misses 7403 12671 +5268
+ Partials 1954 1848 -106
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth implementing the higher level APIs in this PR too, as a way to validate that the low-level and high level can work together (and that this low-level API gives us what we want).
And maybe write a colab showing this functionality in action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
""" | ||
Implementation of rematerialization. | ||
|
||
Args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add return section
@@ -658,6 +658,16 @@ def random_seed_dtype(): | |||
return "int32" | |||
|
|||
|
|||
def remat(func, *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add it in the numpy and openvino backends, returning plain function results with no remat (for compatibility)
@divyashreepathihalli To ensure broader usability, it might be worth considering such scenarios when designing the high-level API, so others don't have to rely on hacks, or at least minimize the need to do so. |
No description provided.