/external/tensorflow/tensorflow/python/kernel_tests/ |
D | svd_op_test.py | 90 def CompareSingularValues(self, x, y, tol): argument 91 self.assertAllClose(x, y, atol=(x[0] + y[0]) * tol) 93 def CompareSingularVectors(self, x, y, rank, tol): argument 108 self.assertAllClose(x, y, atol=2 * tol) 110 def CheckApproximation(self, a, u, s, v, full_matrices_, tol): argument 125 self.assertAllClose(a_recon, a, rtol=tol, atol=tol) 127 def CheckUnitary(self, x, tol): argument 131 self.assertAllClose(identity, xx, atol=tol) 137 tol = 3e-4 if is_single else 1e-12 140 tol *= 100 [all …]
|
D | qr_op_test.py | 102 tol = 1e-5 104 tol = 1e-14 107 self.assertAllClose(a_recon, a, rtol=tol, atol=tol) 114 tol = 1e-5 116 tol = 1e-14 117 self.assertAllClose(identity, xx, atol=tol) 179 tol = 3e-2 181 tol = 1e-6 198 self.assertAllClose(theoretical, numerical, atol=tol, rtol=tol)
|
D | self_adjoint_eig_op_test.py | 124 def CompareEigenVectors(self, x, y, tol): argument 126 self.assertAllClose(x, y, atol=tol) 128 def CompareEigenDecompositions(self, x_e, x_v, y_e, y_v, tol): argument 138 self.assertAllClose(x_ei, y_ei, atol=tol, rtol=tol) 139 CompareEigenVectors(self, x_vi, y_vi, tol) 210 tol = 1e-2 212 tol = 1e-7 237 self.assertAllClose(theoretical, numerical, atol=tol, rtol=tol)
|
D | tensordot_op_test.py | 165 tol = 0.05 167 tol = 1e-5 169 tol = 1e-12 187 self.assertAllClose(tf_ans, np_ans, rtol=tol, atol=tol) 194 tol = 0.05 196 tol = 1e-5 198 tol = 1e-12 217 self.assertAllClose(tf_ans, np_ans, rtol=tol, atol=tol)
|
D | aggregate_ops_test.py | 68 tol = 5e-3 if dtype == dtypes.float16 else 5e-7 69 self.assertAllClose(expected, actual, rtol=tol, atol=tol) 82 tol = 5e-3 if dtype == dtypes.float16 else 5e-7 83 self.assertAllClose(expected, actual, rtol=tol, atol=tol)
|
/external/eigen/unsupported/test/ |
D | matrix_power.cpp | 13 void test2dRotation(const T& tol) in test2dRotation() argument 29 VERIFY(C.isApprox(B, tol)); in test2dRotation() 34 void test2dHyperbolicRotation(const T& tol) in test2dHyperbolicRotation() argument 51 VERIFY(C.isApprox(B, tol)); in test2dHyperbolicRotation() 56 void test3dRotation(const T& tol) in test3dRotation() argument 65 VERIFY(AngleAxis<T>(angle, v).matrix().isApprox(AngleAxis<T>(1,v).matrix().pow(angle), tol)); in test3dRotation() 70 void testGeneral(const MatrixType& m, const typename MatrixType::RealScalar& tol) in testGeneral() argument 87 VERIFY(m4.isApprox(m5, tol)); in testGeneral() 91 VERIFY(m4.isApprox(m5, tol)); in testGeneral() 95 VERIFY(m4.isApprox(m5, tol)); in testGeneral() [all …]
|
D | matrix_exponential.cpp | 27 void test2dRotation(double tol) in test2dRotation() argument 40 VERIFY(C.isApprox(B, static_cast<T>(tol))); in test2dRotation() 44 VERIFY(C.isApprox(B, static_cast<T>(tol))); in test2dRotation() 49 void test2dHyperbolicRotation(double tol) in test2dHyperbolicRotation() argument 65 VERIFY(C.isApprox(B, static_cast<T>(tol))); in test2dHyperbolicRotation() 69 VERIFY(C.isApprox(B, static_cast<T>(tol))); in test2dHyperbolicRotation() 74 void testPascal(double tol) in testPascal() argument 89 VERIFY(C.isApprox(B, static_cast<T>(tol))); in testPascal() 93 VERIFY(C.isApprox(B, static_cast<T>(tol))); in testPascal() 98 void randomTest(const MatrixType& m, double tol) in randomTest() argument [all …]
|
/external/eigen/unsupported/Eigen/src/Eigenvalues/ |
D | ArpackSelfAdjointEigenSolver.h | 103 int options=ComputeEigenvectors, RealScalar tol=0.0) 111 compute(A, B, nbrEigenvalues, eigs_sigma, options, tol); in m_eivec() 138 int options=ComputeEigenvectors, RealScalar tol=0.0) 146 compute(A, nbrEigenvalues, eigs_sigma, options, tol); in m_eivec() 175 int options=ComputeEigenvectors, RealScalar tol=0.0); 201 int options=ComputeEigenvectors, RealScalar tol=0.0); 336 std::string eigs_sigma, int options, RealScalar tol) in compute() argument 339 compute(A, B, nbrEigenvalues, eigs_sigma, options, tol); in compute() 349 std::string eigs_sigma, int options, RealScalar tol) in compute() argument 509 internal::arpack_wrapper<Scalar, RealScalar>::saupd(&ido, bmat, &n, whch, &nev, &tol, resid, in compute() [all …]
|
/external/skqp/tests/ |
D | ClipCubicTest.cpp | 52 float tol) { in CurvesAreEqual() argument 54 if (SkScalarAbs(c0[i].fX - c1[i].fX) > tol || in CurvesAreEqual() 55 SkScalarAbs(c0[i].fY - c1[i].fY) > tol in CurvesAreEqual() 91 const float tol = 1e-4f; in DEF_TEST() local 99 0, 0, 2, 3, 1, 10, 4, 12, shouldbe), tol)); in DEF_TEST() 107 0, 0, 2, 3, 1, 10, 4, 12, shouldbe), tol)); in DEF_TEST() 115 0, 0, 2, 3, 1, 10, 4, 12, shouldbe), tol)); in DEF_TEST() 133 shouldbe), tol)); in DEF_TEST() 145 shouldbe), tol)); in DEF_TEST() 157 shouldbe), tol)); in DEF_TEST() [all …]
|
D | PathCoverageTest.cpp | 59 static inline uint32_t compute_pointCount(SkScalar d, SkScalar tol) { in compute_pointCount() argument 60 if (d < tol) { in compute_pointCount() 63 int temp = SkScalarCeilToInt(SkScalarSqrt(d / tol)); in compute_pointCount() 74 static uint32_t quadraticPointCount_EC(const SkPoint points[], SkScalar tol) { in quadraticPointCount_EC() argument 76 return compute_pointCount(SkIntToScalar(distance), tol); in quadraticPointCount_EC() 84 static uint32_t quadraticPointCount_CC(const SkPoint points[], SkScalar tol) { in quadraticPointCount_CC() argument 86 return compute_pointCount(distance, tol); in quadraticPointCount_CC()
|
/external/skia/tests/ |
D | ClipCubicTest.cpp | 52 float tol) { in CurvesAreEqual() argument 54 if (SkScalarAbs(c0[i].fX - c1[i].fX) > tol || in CurvesAreEqual() 55 SkScalarAbs(c0[i].fY - c1[i].fY) > tol in CurvesAreEqual() 91 const float tol = 1e-4f; in DEF_TEST() local 99 0, 0, 2, 3, 1, 10, 4, 12, shouldbe), tol)); in DEF_TEST() 107 0, 0, 2, 3, 1, 10, 4, 12, shouldbe), tol)); in DEF_TEST() 115 0, 0, 2, 3, 1, 10, 4, 12, shouldbe), tol)); in DEF_TEST() 133 shouldbe), tol)); in DEF_TEST() 145 shouldbe), tol)); in DEF_TEST() 157 shouldbe), tol)); in DEF_TEST() [all …]
|
D | PathCoverageTest.cpp | 59 static inline uint32_t compute_pointCount(SkScalar d, SkScalar tol) { in compute_pointCount() argument 60 if (d < tol) { in compute_pointCount() 63 int temp = SkScalarCeilToInt(SkScalarSqrt(d / tol)); in compute_pointCount() 74 static uint32_t quadraticPointCount_EC(const SkPoint points[], SkScalar tol) { in quadraticPointCount_EC() argument 76 return compute_pointCount(SkIntToScalar(distance), tol); in quadraticPointCount_EC() 84 static uint32_t quadraticPointCount_CC(const SkPoint points[], SkScalar tol) { in quadraticPointCount_CC() argument 86 return compute_pointCount(distance, tol); in quadraticPointCount_CC()
|
/external/python/cpython3/Lib/test/ |
D | test_statistics.py | 76 def approx_equal(x, y, tol=1e-12, rel=1e-7): argument 110 if tol < 0 or rel < 0: 125 allowed_error = max(tol, rel*max(abs(x), abs(y))) 184 tol = rel = 0 variable in NumericTestCase 187 self, first, second, tol=None, rel=None, msg=None argument 217 if tol is None: 218 tol = self.tol 228 check(first, second, tol, rel, msg) 230 def _check_approx_seq(self, first, second, tol, rel, msg): argument 239 self._check_approx_num(a, e, tol, rel, msg, i) [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/signal/ |
D | fft_ops_test.py | 174 for np_type, tol in ((np.complex64, 1e-4), (np.complex128, 1e-8)): 179 (4,) * dims).astype(np_type), rank, rtol=tol, atol=tol) 185 for np_type, tol in ((np.complex64, 1e-4), (np.complex128, 1e-5)): 188 (128,) * dims).astype(np_type), rank, rtol=tol, atol=tol) 203 for np_type, tol in ((np.complex64, 1e-4), (np.complex128, 1e-8)): 209 rank, use_placeholder=True, rtol=tol, atol=tol) 214 for np_type, tol in ((np.complex64, 1e-4), (np.complex128, 5e-6)): 224 rtol=tol, atol=tol) 231 tol = {(np.complex64, True): 1e-4, 243 self._compare(gen((dim,)).astype(np_type), 1, rtol=tol, atol=tol) [all …]
|
/external/tensorflow/tensorflow/contrib/layers/python/layers/ |
D | normalization_test.py | 115 def doOutputTest(self, input_shape, data_format, tol=1e-3): argument 142 self.assertAllClose(expected_mean, mean, rtol=tol, atol=tol) 143 self.assertAllClose(expected_var, var, rtol=tol, atol=tol) 146 self.doOutputTest((10, 10, 10, 30), 'NHWC', tol=1e-2) 149 self.doOutputTest((10, 10, 10, 30), 'NCHW', tol=1e-2) 152 self.doOutputTest((1, 100, 100, 1), 'NHWC', tol=1e-3) 155 self.doOutputTest((1, 100, 100, 1), 'NCHW', tol=1e-3) 158 self.doOutputTest((10, 10, 10, 10, 30), 'NHWC', tol=1e-2) 161 self.doOutputTest((10, 10, 10, 10, 30), 'NCHW', tol=1e-2) 164 self.doOutputTest((1, 100, 100, 1, 1), 'NHWC', tol=1e-3) [all …]
|
/external/tensorflow/tensorflow/contrib/solvers/python/kernel_tests/ |
D | linear_equations_test.py | 56 tol = 1e-6 if dtype_ == np.float64 else 1e-3 81 tol=tol, 96 self.assertLessEqual(norm_r, tol * norm_r0) 101 self.assertLessEqual(norm_r_np, tol * norm_r0) 107 self.assertAllClose(cg_results[0].r, cg_results[1].r, rtol=tol) 108 self.assertAllClose(cg_results[0].x, cg_results[1].x, rtol=tol) 109 self.assertAllClose(cg_results[0].p, cg_results[1].p, rtol=tol)
|
D | least_squares_test.py | 49 tol = 1e-12 if dtype_ == np.float64 else 1e-6 59 cgls_graph = least_squares.cgls(operator, rhs, tol=tol, max_iter=max_iter) 67 self.assertLessEqual(norm_s, tol * norm_s0) 72 self.assertLessEqual(norm_s_np, tol * norm_s0)
|
D | lanczos_test.py | 49 tol = 1e-12 if dtype_ == np.float64 else 1e-5 73 self.assertAllClose(av_val, ub_val, atol=tol, rtol=tol) 74 self.assertAllClose(atu_val, vbt_val, atol=tol, rtol=tol)
|
/external/eigen/unsupported/Eigen/src/LevenbergMarquardt/ |
D | LevenbergMarquardt.h | 135 const Scalar tol = std::sqrt(NumTraits<Scalar>::epsilon()) 141 const Scalar tol = std::sqrt(NumTraits<Scalar>::epsilon()) 346 const Scalar tol in lmder1() argument 353 if (n <= 0 || m < n || tol < 0.) in lmder1() 357 m_ftol = tol; in lmder1() 358 m_xtol = tol; in lmder1() 371 const Scalar tol in lmdif1() argument 378 if (n <= 0 || m < n || tol < 0.) in lmdif1() 384 lm.setFtol(tol); in lmdif1() 385 lm.setXtol(tol); in lmdif1()
|
/external/skia/samplecode/ |
D | SamplePath.cpp | 304 const SkScalar tol = 4; in onFindClickHandler() local 305 const SkRect r = SkRect::MakeXYWH(x - tol, y - tol, tol * 2, tol * 2); in onFindClickHandler() 437 const SkScalar tol = 4; in onFindClickHandler() local 438 const SkRect r = SkRect::MakeXYWH(x - tol, y - tol, tol * 2, tol * 2); in onFindClickHandler() 560 const SkScalar tol = 8; in onFindClickHandler() local 561 const SkRect r = SkRect::MakeXYWH(x - tol, y - tol, tol * 2, tol * 2); in onFindClickHandler() 763 const SkScalar tol = 8; in onFindClickHandler() local 764 const SkRect r = SkRect::MakeXYWH(x - tol, y - tol, tol * 2, tol * 2); in onFindClickHandler()
|
/external/skqp/samplecode/ |
D | SamplePath.cpp | 304 const SkScalar tol = 4; in onFindClickHandler() local 305 const SkRect r = SkRect::MakeXYWH(x - tol, y - tol, tol * 2, tol * 2); in onFindClickHandler() 437 const SkScalar tol = 4; in onFindClickHandler() local 438 const SkRect r = SkRect::MakeXYWH(x - tol, y - tol, tol * 2, tol * 2); in onFindClickHandler() 560 const SkScalar tol = 8; in onFindClickHandler() local 561 const SkRect r = SkRect::MakeXYWH(x - tol, y - tol, tol * 2, tol * 2); in onFindClickHandler() 763 const SkScalar tol = 8; in onFindClickHandler() local 764 const SkRect r = SkRect::MakeXYWH(x - tol, y - tol, tol * 2, tol * 2); in onFindClickHandler()
|
/external/tensorflow/tensorflow/contrib/distributions/python/ops/ |
D | deterministic.py | 128 def _get_tol(self, tol): argument 129 if tol is None: 132 tol = ops.convert_to_tensor(tol, dtype=self.loc.dtype) 134 tol = control_flow_ops.with_dependencies([ 136 tol, message="Argument 'tol' must be non-negative") 137 ], tol) 138 return tol
|
/external/tensorflow/tensorflow/contrib/solvers/python/ops/ |
D | least_squares.py | 32 def cgls(operator, rhs, tol=1e-6, max_iter=20, name="cgls"): argument 81 return math_ops.logical_and(i < max_iter, state.gamma > tol) 100 tol = tol * tol * gamma0
|
/external/eigen/bench/spbench/ |
D | spbenchsolver.cpp | 62 double tol = 1e-08; in main() local 65 tol = atof(inval.c_str()); in main() 71 Browse_Matrices<double>(matrix_dir, statFileExists, statFile,maxiters, tol); in main() 74 Browse_Matrices<std::complex<double> >(matrix_dir, statFileExists, statFile, maxiters, tol); in main()
|
/external/tensorflow/tensorflow/compiler/xla/client/lib/ |
D | self_adjoint_eig.cc | 78 XlaOp q, XlaOp tol) { in SymmetricShurDecomposition2x2() argument 99 auto c = Select(Ge(Abs(pqs), tol), c_temp, ZerosLike(c_temp) + one); in SymmetricShurDecomposition2x2() 100 auto s = Select(Ge(Abs(pqs), tol), s_temp, ZerosLike(s_temp)); in SymmetricShurDecomposition2x2() 114 XlaOp tol, int64 n) { in Update() argument 117 jacobi_update.w, p, q, tol)); in Update() 232 auto tol = norms.total_norm * values[3]; in WhileLoopFn() local 233 auto tol_cond = ReduceAll(Lt(tol, norms.off_diagonal_norm), in WhileLoopFn() 270 auto tol = values_innermost[4]; in WhileLoopFn() local 273 Update(jacobi_update, p, q, tol, matrix_dimension)); in WhileLoopFn() 282 updated_values_innermost.push_back(tol); in WhileLoopFn() [all …]
|