Disable gradients in inference mode#80
Merged
reidtatge merged 1 commit intoMPACT-ORG:mainfrom Apr 22, 2025
Merged
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
reidtatge
approved these changes
Apr 17, 2025
Contributor
Author
No, I am disabling gradients only during validation. That's the proper PyTorch setup. Line 17-28: training, gradients on, model in train mode Line 31-44: evaluation, gradients off, model in eval mode |
Member
|
Yeah, I realized that right after I wrote the message. No problem.
…On Thu, Apr 17, 2025 at 4:12 PM Aart Bik ***@***.***> wrote:
You're just disabling the gradient stuff? Any particular reason why?
No, I am disabling gradients *only* during validation. That's the proper
PyTorch setup.
Line 17-28: training, gradients on, model in train mode
Line 31-44: evaluation, gradients off, model in eval mode
—
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIRIKE7WYMJA6NHIWGAZQ3T22AYOTAVCNFSM6AAAAAB3L65XF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJUGE4DGNZSGM>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
*aartbik* left a comment (MPACT-ORG/mpact-compiler#80)
<#80 (comment)>
You're just disabling the gradient stuff? Any particular reason why?
No, I am disabling gradients *only* during validation. That's the proper
PyTorch setup.
Line 17-28: training, gradients on, model in train mode
Line 31-44: evaluation, gradients off, model in eval mode
—
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIRIKE7WYMJA6NHIWGAZQ3T22AYOTAVCNFSM6AAAAAB3L65XF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJUGE4DGNZSGM>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Contributor
Author
|
It looks like one of you has to commit this.... |
Member
|
Done.
…On Tue, Apr 22, 2025 at 1:01 PM Aart Bik ***@***.***> wrote:
It looks like one of you has to commit this....
—
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIRIKE7AWK4M4WLCBLUEDLD222N27AVCNFSM6AAAAAB3L65XF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMRSGM2TANRWGQ>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
*aartbik* left a comment (MPACT-ORG/mpact-compiler#80)
<#80 (comment)>
It looks like one of you has to commit this....
—
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIRIKE7AWK4M4WLCBLUEDLD222N27AVCNFSM6AAAAAB3L65XF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMRSGM2TANRWGQ>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.