/external/tensorflow/tensorflow/compiler/tests/ |
D | special_math_test.py | 91 def adjust_tolerance_for_tpu(self, dtype, rtol, atol): argument 93 return rtol, atol 99 def _test_range(self, low, high, dtype, rtol, atol, is_negative=False): argument 101 rtol, atol = self.adjust_tolerance_for_tpu(dtype, rtol, atol) 111 self.assertAllClose(expected_values, actual, atol=atol, rtol=rtol) 115 def testSmallX(self, dtype, rtol, atol): argument 116 self._test_range(-40., -20., dtype, rtol, atol, is_negative=False) 117 self._test_range(-40., -20., dtype, rtol, atol, is_negative=True) 121 def testGreaterThanNegativeTwentyExponent(self, dtype, rtol, atol): argument 122 self._test_range(-20., -10., dtype, rtol, atol, is_negative=False) [all …]
|
D | reduce_ops_test.py | 45 rtol=1e-4, argument 57 result, np_reduce_fn(test_input, axis=0), rtol=rtol, atol=atol) 61 result, np_reduce_fn(test_input, axis=1), rtol=rtol, atol=atol) 65 result, np_reduce_fn(test_input, axis=1), rtol=rtol, atol=atol) 194 rtol=1e-3, argument 223 rtol=rtol,
|
D | ftrl_test.py | 205 rtol=1e-4, 211 rtol=1e-4) 239 rtol=1e-5) 243 rtol=1e-5) 278 rtol=1e-4) 282 rtol=1e-4) 339 self.assertAllCloseAccordingToType(val0, val2, rtol=1e-4, half_rtol=1e-2) 340 self.assertAllCloseAccordingToType(val1, val3, rtol=1e-4, half_rtol=1e-2) 351 self.assertAllCloseAccordingToType(val0, val2, rtol=1e-5) 352 self.assertAllCloseAccordingToType(val1, val3, rtol=1e-5)
|
D | unary_ops_test.py | 57 rtol=1e-3, argument 79 expected, result, rtol=rtol, atol=atol, bfloat16_rtol=0.03) 81 equality_test(result, expected, rtol=rtol, atol=atol) 83 def ListsAreClose(self, result, expected, rtol, atol): argument 87 self.assertAllClose(result[i], expected[i], rtol, atol) 89 def AssertCloseAndSorted(self, result, expected, rtol, atol): argument 91 self.assertAllClose(result, expected, rtol, atol) 94 def AssertAllEqual(self, result, expected, rtol, atol): argument 155 math_ops.log, x, expected=np.log(x), atol=tol, rtol=tol) 159 math_ops.log, x, expected=np.log(x), atol=tol, rtol=tol) [all …]
|
D | clustering_test.py | 47 self.assertAllClose(result, expected, rtol=1e-3) 61 self.assertAllClose(result, expected, rtol=1e-3) 81 self.assertAllClose(result, [12., 2.], rtol=1e-3) 99 self.assertAllClose(expected, result, rtol=1e-3)
|
D | matrix_diag_ops_test.py | 338 rtol=1e-3, argument 360 expected, result, rtol=rtol, atol=atol, bfloat16_rtol=0.03) 524 rtol=1e-3, argument 552 expected, result, rtol=rtol, atol=atol, bfloat16_rtol=0.03) 657 rtol=1e-3, argument 680 expected, result, rtol=rtol, atol=atol, bfloat16_rtol=0.03)
|
D | binary_ops_test.py | 49 rtol=None, argument 59 if rtol is None: 60 rtol = 1e-15 if a.dtype == np.float64 else 1e-3 63 equality_test(result, expected, rtol=rtol, atol=atol) 69 def ListsAreClose(self, result, expected, rtol, atol): argument 74 result[i], expected[i], rtol=rtol, atol=atol) 97 rtol=1e-6, 137 rtol=1e-4, 146 rtol=1e-6, 170 rtol=1e-10, [all …]
|
D | adadelta_test.py | 118 rtol=1e-5) 123 rtol=1e-5) 131 rtol=1e-5) 138 rtol=1e-5)
|
D | ternary_ops_test.py | 36 def _testTernary(self, op, a, b, c, expected, rtol=1e-3, atol=1e-6): argument 44 self.assertAllClose(result, expected, rtol=rtol, atol=atol) 230 math_ops.betainc, a, b, x, expected, rtol=5e-6, atol=6e-6) 254 def testBetainc(self, sigma, rtol, atol): argument 264 math_ops.betainc, a, b, x, expected, rtol=rtol, atol=atol)
|
D | while_test.py | 59 self.assertAllClose(result, [10], rtol=1e-3) 83 self.assertAllClose(result, [10, 15.0], rtol=1e-3) 85 self.assertAllClose(no_iters_result, [10, 0.0], rtol=1e-3) 109 self.assertAllClose(result[1], np.complex64(15 + 20j), rtol=1e-3) 111 self.assertAllClose(no_iters_result[1], np.complex64(0), rtol=1e-3) 133 self.assertAllClose(result, [10, 7], rtol=1e-3)
|
/external/tensorflow/tensorflow/python/ops/distributions/ |
D | bijector_test_util.py | 52 rtol=0.01, argument 151 inverse_forward_x_v, uniform_x_samps_v, atol=1e-5, rtol=1e-3) 153 forward_inverse_y_v, uniform_y_samps_v, atol=1e-5, rtol=1e-3) 156 upper_x - lower_x, change_measure_dy_dx_v, atol=0, rtol=rtol) 160 dy_dx_v, np.divide(1., dx_dy_v), atol=1e-5, rtol=1e-3) 164 bijector, x, y, event_ndims, atol=0, rtol=1e-5, sess=None): argument 222 np.testing.assert_allclose(x_from_x, x, atol=atol, rtol=rtol) 223 np.testing.assert_allclose(y_from_y, y, atol=atol, rtol=rtol) 224 np.testing.assert_allclose(-ildj_f_x, fldj_x, atol=atol, rtol=rtol) 225 np.testing.assert_allclose(-ildj_y, fldj_g_y, atol=atol, rtol=rtol)
|
/external/tensorflow/tensorflow/core/framework/ |
D | tensor_testutil.cc | 118 const T& rtol) { in IsClose() argument 123 auto tolerance = atol + rtol * Eigen::numext::abs(x); in IsClose() 132 const T& atol, const T& rtol) { in IsClose() argument 133 if (IsClose(x.real(), y.real(), atol, rtol) && in IsClose() 134 IsClose(x.imag(), y.imag(), atol, rtol)) in IsClose() 151 double rtol) { in ExpectClose() argument 153 auto typed_rtol = GetTolerance<T>(rtol); in ExpectClose() 165 << "Too many mismatches (atol = " << atol << " rtol = " << rtol in ExpectClose() 169 << "Mismatches detected (atol = " << atol << " rtol = " << rtol << ")."; in ExpectClose() 224 void ExpectClose(const Tensor& x, const Tensor& y, double atol, double rtol) { in ExpectClose() argument [all …]
|
D | tensor_testutil.h | 105 double rtol = -1.0); 126 double atol = -1.0, double rtol = -1.0); 128 double rtol = -1.0); 130 double rtol = -1.0);
|
/external/tensorflow/tensorflow/python/kernel_tests/signal/ |
D | fft_ops_test.py | 47 rtol=1e-4, atol=1e-4): argument 48 self._compare_forward(x, rank, fft_length, use_placeholder, rtol, atol) 49 self._compare_backward(x, rank, fft_length, use_placeholder, rtol, atol) 52 rtol=1e-4, atol=1e-4): argument 63 self.assertAllClose(x_np, x_tf, rtol=rtol, atol=atol) 66 rtol=1e-4, atol=1e-4): argument 77 self.assertAllClose(x_np, x_tf, rtol=rtol, atol=atol) 86 rtol=1e-2, atol=1e-2): argument 105 self.assertAllClose(x_jacob_t, x_jacob_n, rtol=rtol, atol=atol) 106 self.assertAllClose(y_jacob_t, y_jacob_n, rtol=rtol, atol=atol) [all …]
|
D | dct_ops_test.py | 152 def _compare(self, signals, n, norm, dct_type, atol, rtol): argument 157 self.assertAllClose(np_dct, tf_dct, atol=atol, rtol=rtol) 161 self.assertAllClose(np_idct, tf_idct, atol=atol, rtol=rtol) 164 self.assertAllClose(scipy_dct, tf_dct, atol=atol, rtol=rtol) 166 self.assertAllClose(scipy_idct, tf_idct, atol=atol, rtol=rtol) 180 self.assertAllClose(signals, tf_idct_dct, atol=atol, rtol=rtol) 181 self.assertAllClose(signals, tf_dct_idct, atol=atol, rtol=rtol) 199 rtol=tol, atol=tol)
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | betainc_op_test.py | 58 rtol = 1e-4 61 scipy_out, tf_out, rtol=rtol, atol=atol) 70 scipy_comb, tf_comb, rtol=rtol, atol=atol) 77 rtol=rtol, 82 rtol=rtol, 87 rtol=rtol, 92 rtol=rtol, 97 rtol=rtol,
|
D | reduction_ops_test.py | 177 def _compareGradient(self, x, reduction_axes, rtol=1e-8, atol=1e-8): argument 180 self._compareGradient(x, reduction_axes[0], rtol=rtol, atol=atol) 186 self.assertAllClose(jacob_t, jacob_n, rtol=rtol, atol=atol) 188 def _compareGradientAxes(self, x, rtol=1e-8, atol=1e-8): argument 189 self._compareGradient(x, None, rtol=rtol, atol=atol) 190 self._compareGradient(x, [], rtol=rtol, atol=atol) 191 self._compareGradient(x, 0, rtol=rtol, atol=atol) 192 self._compareGradient(x, [1], rtol=rtol, atol=atol) 193 self._compareGradient(x, [2], rtol=rtol, atol=atol) 194 self._compareGradient(x, [1, 2], rtol=rtol, atol=atol) [all …]
|
/external/tensorflow/tensorflow/python/ops/parallel_for/ |
D | test_util.py | 42 def run_and_assert_equal(self, targets1, targets2, rtol=1e-4, atol=1e-5): argument 48 self.assertAllClose(outputs[i + n], outputs[i], rtol=rtol, atol=atol) 57 rtol=1e-4, argument 67 self.run_and_assert_equal(t1, t2, rtol=rtol, atol=atol)
|
/external/tensorflow/tensorflow/python/keras/ |
D | activations_test.py | 89 self.assertAllClose(result[0], expected, rtol=1e-05) 101 self.assertAllClose(result[0, 0], expected, rtol=1e-05) 111 self.assertAllClose(result, positive_values * scale, rtol=1e-05) 127 self.assertAllClose(result, expected, rtol=1e-05) 138 self.assertAllClose(result, expected, rtol=1e-05) 154 self.assertAllClose(result, expected, rtol=1e-05) 167 self.assertAllClose(result, expected, rtol=1e-05) 174 self.assertAllClose(result, positive_values, rtol=1e-05) 179 self.assertAllClose(result, expected, rtol=1e-05) 196 self.assertAllClose(result, expected, rtol=1e-05) [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/distributions/ |
D | special_math_test.py | 156 _error32 = ErrorSpec(rtol=1e-4, atol=0.) 157 _error64 = ErrorSpec(rtol=1e-6, atol=0.) 188 rtol=error_spec.rtol, 214 rtol=error_spec.rtol, 230 _error32 = ErrorSpec(rtol=1e-4, atol=0.) 231 _error64 = ErrorSpec(rtol=1e-4, atol=0.) 245 _error32 = ErrorSpec(rtol=0.1, atol=1e-7) 246 _error64 = ErrorSpec(rtol=0.1, atol=1e-7) 259 _error32 = ErrorSpec(rtol=1e-6, atol=1e-14) 260 _error64 = ErrorSpec(rtol=1e-6, atol=1e-14) [all …]
|
D | multinomial_test.py | 93 self.assertAllClose(-200, lp, atol=0, rtol=1e-6) 301 self.assertAllClose(sample_mean_, analytic_mean, atol=0.01, rtol=0.01) 302 self.assertAllClose(sample_cov_, analytic_cov, atol=0.01, rtol=0.01) 303 self.assertAllClose(sample_var_, analytic_var, atol=0.01, rtol=0.01) 304 self.assertAllClose(sample_stddev_, analytic_stddev, atol=0.01, rtol=0.01) 331 self.assertAllClose(actual_mean_, sample_mean_, atol=0., rtol=0.10) 334 actual_covariance_, sample_covariance_, atol=0., rtol=0.20) 360 self.assertAllClose(actual_mean_, sample_mean_, atol=0., rtol=0.10) 363 actual_covariance_, sample_covariance_, atol=0., rtol=0.20)
|
/external/tensorflow/tensorflow/python/keras/mixed_precision/ |
D | layer_correctness_test.py | 151 def test_layer(self, f32_layer_fn, input_shape, rtol=2e-3, atol=2e-3, argument 223 mp_output, f32_output, rtol=rtol, atol=atol) 225 distributed_mp_model.predict(input_data), f32_output, rtol=rtol, 236 mp_model.get_weights(), f32_weights, rtol=rtol, atol=atol) 238 distributed_mp_model.get_weights(), f32_weights, rtol=rtol, atol=atol)
|
/external/tensorflow/tensorflow/python/framework/ |
D | test_util.py | 2569 def _assertArrayLikeAllClose(self, a, b, rtol=1e-6, atol=1e-6, msg=None): argument 2590 if not np.allclose(a, b, rtol=rtol, atol=atol): 2600 np.abs(a - b) > atol + rtol * np.abs(b), 2612 msgs.append("not close tol = {}".format(atol + rtol * np.abs(y))) 2618 a, b, rtol=rtol, atol=atol, err_msg="\n".join(msgs), equal_nan=True) 2623 rtol=1e-6, argument 2649 a[k], b[k], rtol=rtol, atol=atol, path=path, msg=msg) 2660 rtol=rtol, 2672 a_ele, b_ele, rtol=rtol, atol=atol, path=path, msg=msg) 2680 rtol=rtol, [all …]
|
/external/tensorflow/tensorflow/python/keras/integration_test/ |
D | forwardprop_test.py | 131 rtol=1e-2, argument 144 rtol=rtol, 147 testcase.assertAllClose(num_jac, sym_jac_back, rtol=rtol, atol=atol) 149 testcase.assertAllClose(num_jac, sym_jac_fwd, rtol=rtol, atol=atol) 266 self.assertAllClose(*_compute_hvps(), rtol=1e-5, atol=1e-5)
|
/external/tensorflow/tensorflow/tools/docs/ |
D | tf_doctest_lib.py | 118 def _allclose(self, want, got, rtol=1e-3, atol=1e-3): argument 119 return np.allclose(want, got, rtol=rtol, atol=atol)
|