Open yezhengli-Mr9 opened 4 years ago
OK, I see that "Cholesky decompositions are a common failure mode in GP optimizations" in github.com/tensorflow/probability/issues/650.
I also tried to adjust covariance_fn=ExponentiatedQuadratic(variance=1., lengthscale=1.)
but does not quite help.
Although Gaussian kernel (RBF Kernel) is positive definite, I think Gaussian Process from time to time confronts
Cholesky decomposition was not successful. The input might not be valid.
after (1)covariance_matrix = self.covariance_fn(inputs, inputs)
withself.covariance_fn=ExponentiatedQuadratic
; (2)covariance_matrix = tf.linalg.set_diag(covariance_matrix,tf.linalg.diag_part(covariance_matrix) + tf.keras.backend.epsilon())
Meanwhile,
covariance_matrix = tf.linalg.set_diag(covariance_matrix,tf.linalg.diag_part(covariance_matrix) + 100* tf.keras.backend.epsilon())
might help but cannot solve the problem in a scientific way,only reduce the frequency of the error:Cholesky decomposition was not successful. The input might not be valid.