Home | History | Annotate | Download | only in tests

Lines Matching refs:atol

327   // atol + rtol * abs(x); or both elements may be NaN or infinity. For
330 double atol = 1e-2,
645 bool IsClose(const T& x, const T& y, double atol, double rtol) {
648 return Abs(x - y) < atol + rtol * Abs(x);
652 bool IsClose<complex64>(const complex64& x, const complex64& y, double atol,
659 return Abs(x.imag() - y.imag()) < atol + rtol * Abs(x.imag());
662 return Abs(x.real() - y.real()) < atol + rtol * Abs(x.real());
665 return Abs(x - y) < atol + rtol * Abs(x);
678 Status TensorsAreCloseImpl(const Tensor& x, const Tensor& y, double atol,
683 if (!IsClose(Tx(i), Ty(i), atol, rtol)) {
687 "atol = ", atol, " rtol = ", rtol,
688 " tol = ", atol + rtol * Abs(Tx(i))));
710 // x and y must no more than atol + rtol * abs(x). For non-floating-point
712 Status TensorsAreClose(const Tensor& a, const Tensor& b, double atol,
727 return TensorsAreCloseImpl<float>(a, b, atol, rtol);
729 return TensorsAreCloseImpl<double>(a, b, atol, rtol);
731 return TensorsAreCloseImpl<complex64>(a, b, atol, rtol);
744 const OpTestBuilder& builder, double atol, double rtol) {
848 s = TensorsAreClose(expected_outputs[j], test_outputs[j], atol, rtol);