!42068 添加Cholesky算子对非对称正定输入的校验
Merge pull request !42068 from 李若轩/Cholesky
This commit is contained in:
commit
5134a26def
|
@ -112,6 +112,9 @@ bool CholeskyCpuKernelMod::LaunchKernel(const std::vector<AddressPtr> &inputs, c
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (!input.isApprox(input.transpose()) || llt.info() == Eigen::NumericalIssue) {
|
||||
MS_LOG_EXCEPTION << "Cholesky expects symmetric positive definite matrices as inputs.";
|
||||
}
|
||||
if (!upper_) {
|
||||
output = llt.matrixL();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue