We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import pytensor import pytensor.tensor as pt x_diag = pt.vector("x_diag") x = pt.diag(x_diag) y = pt.log(pt.linalg.det(x)) pytensor.function([x_diag], y).dprint() # Log [id A] 1 # └─ Prod{axes=None} [id B] 0 # └─ x_diag [id C] _, y = pt.linalg.slogdet(x) pytensor.function([x_diag], y).dprint(depth=3) # SLogDet.1 [id A] 4 # └─ AdvancedSetSubtensor [id B] 3 # ├─ Alloc [id C] 2 # ├─ x_diag [id D] # ├─ ARange{dtype='int64'} [id E] 1 # └─ ARange{dtype='int64'} [id E] 1 # └─ ···
The text was updated successfully, but these errors were encountered:
We probably should have linalg.slogdet just return sign(det(x)), log(abs(det(x))) and only later specialize to the SlogDet Op.
linalg.slogdet
sign(det(x)), log(abs(det(x)))
Then we don't need to worry about the two forms of Det during linalg rewrites
Sorry, something went wrong.
Another point brought up by @jessegrabowski is that SlogDet doesn't have grad. One more reason to only introduce it as a specialization.
Successfully merging a pull request may close this issue.
Description
The text was updated successfully, but these errors were encountered: