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

Add lines to force gradient calculation. #231

Merged
merged 4 commits into from
Aug 18, 2023
Merged

Add lines to force gradient calculation. #231

merged 4 commits into from
Aug 18, 2023

Conversation

VarunAnanth2003
Copy link
Contributor

Forces gradient calculation during inference in order to prevent NaNs from being produced.

The line used: with torch.set_grad_enabled(True):

@VarunAnanth2003 VarunAnanth2003 added the bug Something isn't working label Aug 8, 2023
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Merging #231 (08671d6) into dev (51221f9) will decrease coverage by 0.64%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #231      +/-   ##
==========================================
- Coverage   89.24%   88.60%   -0.64%     
==========================================
  Files          12       12              
  Lines         902      904       +2     
==========================================
- Hits          805      801       -4     
- Misses         97      103       +6     
Files Changed Coverage Δ
casanovo/denovo/model.py 97.11% <100.00%> (-0.35%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bittremieux bittremieux linked an issue Aug 9, 2023 that may be closed by this pull request
@bittremieux bittremieux removed the request for review from wsnoble August 18, 2023 09:23
@bittremieux bittremieux merged commit d9396aa into dev Aug 18, 2023
5 of 6 checks passed
@bittremieux bittremieux deleted the force-gradients branch August 18, 2023 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NaN output from model with some weights
2 participants