Skip to content

logdet is not numerically stable #18448

@ssnl

Description

@ssnl

🐛 Bug

In [15]: x = torch.eye(512).div(500000)

In [16]: x.slogdet()
Out[16]: (tensor(0.), tensor(-6718.6489))

In [17]: x.logdet()
Out[17]: tensor(-inf)

Expect

In [12]: x = torch.eye(512).div(500000)

In [13]: x.slogdet()
Out[13]: (tensor(1.), tensor(-6718.6489))

In [14]: x.logdet()
Out[14]: tensor(-6718.6489)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions