keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.06k stars 19.35k forks source link

The torch backend for jnp.cholesky should use torch.linalg.cholesky, not torch.cholesky #19648

Closed jonbarron closed 2 weeks ago

jonbarron commented 2 weeks ago

I got this warning when calling jnp.cholesky with the torch backend:

UserWarning: torch.cholesky is deprecated in favor of torch.linalg.cholesky and will be removed in a future PyTorch release.
L = torch.cholesky(A)
should be replaced with
L = torch.linalg.cholesky(A)
and
U = torch.cholesky(A, upper=True)
should be replaced with
U = torch.linalg.cholesky(A).mH
This transform will produce equivalent results for all valid (symmetric positive definite) inputs. (Triggered internally at third_party/py/torch/aten/src/ATen/native/BatchLinearAlgebra.cpp:1703.)
  return torch.cholesky(x)
fchollet commented 2 weeks ago

Thanks for the report, this is fixed.