Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix slogdet sign requiring grad when input requires grad#16337

Closed
ssnl wants to merge 1 commit into
pytorch:masterfrom
ssnl:slogdet_sign
Closed

Fix slogdet sign requiring grad when input requires grad#16337
ssnl wants to merge 1 commit into
pytorch:masterfrom
ssnl:slogdet_sign

Conversation

@ssnl
Copy link
Copy Markdown
Collaborator

@ssnl ssnl commented Jan 24, 2019

The real fix for #15605.

This is sort of BC breaking because now

In [1]: import torch

In [2]: a = torch.randn(3, 3, requires_grad=True)

In [3]: a.slogdet()
Out[3]: (tensor(1.), tensor(0.1356, grad_fn=<SlogdetBackward>))

In [4]: a.slogdet()[0].requires_grad
Out[4]: False

while before this patch a.slogdet()[0] requires grad with grad_fn=<SlogdetBackward>. But any use of backproping through this value will meet the error in #15605 so I don't think this is a problem.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@soumith is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ssnl ssnl deleted the slogdet_sign branch January 27, 2019 22:33
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
The real fix for pytorch#15605.

This is sort of BC breaking because now
```py
In [1]: import torch

In [2]: a = torch.randn(3, 3, requires_grad=True)

In [3]: a.slogdet()
Out[3]: (tensor(1.), tensor(0.1356, grad_fn=<SlogdetBackward>))

In [4]: a.slogdet()[0].requires_grad
Out[4]: False
```
while before this patch ` a.slogdet()[0]` requires grad with `grad_fn=<SlogdetBackward>`. But any use of backproping through this value will meet the error in pytorch#15605 so I don't think this is a problem.
Pull Request resolved: pytorch#16337

Differential Revision: D13832644

Pulled By: soumith

fbshipit-source-id: f96c477e99edcbdbd966888e5c5ea7fd058429a8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants