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
As illustrated in the scipy unit tests, the scipy implementation of LSMR supports complex matrices: https://github.com/scipy/scipy/blob/main/scipy/sparse/linalg/_isolve/tests/test_lsmr.py
The version in pytorch-minimize currently does not as the real scalar numbers are created from the dtype of b rather than the equivalent real version.
A quick try to adapt it seems to work as shown here: https://github.com/cai4cai/torchsparsegradutils/blob/main/torchsparsegradutils/utils/lsmr.py
It also passes the ported scipy unit tests: https://github.com/cai4cai/torchsparsegradutils/blob/main/tests/test_lsmr.py
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As illustrated in the scipy unit tests, the scipy implementation of LSMR supports complex matrices:
https://github.com/scipy/scipy/blob/main/scipy/sparse/linalg/_isolve/tests/test_lsmr.py
The version in pytorch-minimize currently does not as the real scalar numbers are created from the dtype of b rather than the equivalent real version.
A quick try to adapt it seems to work as shown here:
https://github.com/cai4cai/torchsparsegradutils/blob/main/torchsparsegradutils/utils/lsmr.py
It also passes the ported scipy unit tests:
https://github.com/cai4cai/torchsparsegradutils/blob/main/tests/test_lsmr.py
The text was updated successfully, but these errors were encountered: