-
Notifications
You must be signed in to change notification settings - Fork 137
[linalg] Add support for cholesky
decomposition
#563
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Thank you @jon-tow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great doc comments and testing!
Awesome! @dan-zheng , @saeta |
[0.02154995, 0.2738613]], | ||
[[2.4748755, -0.7071073], | ||
[-0.7071073, 0.3535535]]]) | ||
assertEqual(computedGradient, expectedGradient, accuracy: 1e-5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The accuracy level: is that a rtol or atol?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in any case it is too high
/// - Parameter input: A tensor of shape `[..., M, M]`. | ||
@inlinable | ||
@differentiable(vjp: _vjpCholesky) | ||
public func cholesky<T: TensorFlowFloatingPoint>(_ x: Tensor<T>) -> Tensor<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work with batching?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, it sure does! Check out some of the shapes used in testing.
let shapes = [[3, 3], [4, 2, 2], [2, 1, 16, 16]] |
Adds basic support for
cholesky
decomposition.Issue: #562