Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix torch error on misc.CovarianceMatrix #147

Merged
merged 10 commits into from
Jan 24, 2024
Merged

Conversation

louisoutin
Copy link
Contributor

Hello,

Thanks for the repository and nice documentation.

When running the end_to_end example with BachelierNet, I ran into the following error:

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [20, 40]], which is output 0 of SubBackward0

(using torch == 2.1.2 on cpu)

I fixed it by changing the inplace operation in CovarianceMatrix.compute_covariance (misc.py line 136, check the PR change).

louisoutin and others added 2 commits December 25, 2023 20:12
fix inplace operation (pytorch bug)
@jankrepl
Copy link
Owner

jankrepl commented Jan 24, 2024

@louisoutin thank you for the PR and sorry it took me so long to have a look:)

I will play around with it a little bit (e.g. fixing the CI) and hopefully merge soon:)

@jankrepl jankrepl merged commit 2d0d831 into jankrepl:master Jan 24, 2024
3 checks passed
@jankrepl
Copy link
Owner

@louisoutin Thank you again:)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants