You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am adapting the docstring example of optax.lbfgs() to use complex-valued parameters instead of real-valued ones. The output function to optimize is still real-valued. But this raises a TypeError: true_fun and false_fun output must have identical types when calling solver.update, along with a warning ComplexWarning: Casting complex values to real discards the imaginary part. I am guessing that this warning is the source of the TypeError.
The LBFGS optimizer does not yet support complex parameters. It should not be too hard to add this feature (see https://jaxopt.github.io/stable/_modules/jaxopt/_src/lbfgs.html#LBFGS).
Would you be willing to do such a PR?
If not you may rephrase the title of the issue as "Add support to complex inputs for LBFGS", I can treat that later.
I am adapting the docstring example of
optax.lbfgs()
to use complex-valued parameters instead of real-valued ones. The output function to optimize is still real-valued. But this raises aTypeError: true_fun and false_fun output must have identical types
when callingsolver.update
, along with a warningComplexWarning: Casting complex values to real discards the imaginary part
. I am guessing that this warning is the source of the TypeError.MWE:
Stack trace:
The text was updated successfully, but these errors were encountered: