/third_party/mindspore/tests/ut/cpp/parallel/ops_info/ |
D | tanh_info_test.cc | 31 TanhInfoPtr tanh; variable 62 tanh = std::make_shared<TanhInfo>("tanh_info", inputs_shape, outputs_shape, attr); in SetUp() 69 tanh->Init(strategy); in TEST_F() 70 Shape dev_matrix_shape = tanh->dev_matrix_shape(); in TEST_F() 80 tanh->Init(strategy); in TEST_F() 81 std::vector<TensorInfo> inputs = tanh->inputs_tensor_info(); in TEST_F() 82 std::vector<TensorInfo> outputs = tanh->outputs_tensor_info(); in TEST_F() 101 tanh->Init(strategy); in TEST_F() 102 std::vector<TensorInfo> inputs = tanh->inputs_tensor_info(); in TEST_F() 103 std::vector<TensorInfo> outputs = tanh->outputs_tensor_info(); in TEST_F() [all …]
|
/third_party/skia/resources/sksl/intrinsics/ |
D | Tanh.sksl | 6 return (tanh(inputVal.x) == expected.x && 7 tanh(inputVal.xy) == expected.xy && 8 tanh(inputVal.xyz) == expected.xyz && 9 tanh(inputVal.xyzw) == expected.xyzw && 10 tanh(constVal.x) == expected.x && 11 tanh(constVal.xy) == expected.xy && 12 tanh(constVal.xyz) == expected.xyz && 13 tanh(constVal.xyzw) == expected.xyzw) ? colorGreen : colorRed;
|
/third_party/jerryscript/tests/unit-libm/ |
D | test-libm.inc.h | 865 check_double ("tanh (0.0)", tanh (0.0), 0.00000000000000000000E+00); 866 check_double ("tanh (-0.0)", tanh (-0.0), -0.00000000000000000000E+00); 867 check_double ("tanh (1.0)", tanh (1.0), 7.61594155955764851029E-01); 868 check_double ("tanh (-1.0)", tanh (-1.0), -7.61594155955764851029E-01); 869 check_double ("tanh (INFINITY)", tanh (INFINITY), 1.00000000000000000000E+00); 870 check_double ("tanh (-INFINITY)", tanh (-INFINITY), -1.00000000000000000000E+00); 871 check_double ("tanh (NAN)", tanh (NAN), NAN); 872 check_double ("tanh (M_PI)", tanh (M_PI), 9.96272076220749980280E-01); 873 check_double ("tanh (-M_PI)", tanh (-M_PI), -9.96272076220749980280E-01); 874 check_double ("tanh (2.0 * M_PI)", tanh (2.0 * M_PI), 9.99993025339610652757E-01); [all …]
|
/third_party/jerryscript/tools/unit-tests/ |
D | gen-test-libm.c | 1070 GEN_DBL_TEST (tanh (0.0)); in main() 1071 GEN_DBL_TEST (tanh (-0.0)); in main() 1072 GEN_DBL_TEST (tanh (1.0)); in main() 1073 GEN_DBL_TEST (tanh (-1.0)); in main() 1074 GEN_DBL_TEST (tanh (INFINITY)); in main() 1075 GEN_DBL_TEST (tanh (-INFINITY)); in main() 1076 GEN_DBL_TEST (tanh (NAN)); in main() 1077 GEN_DBL_TEST (tanh (M_PI)); in main() 1078 GEN_DBL_TEST (tanh (-M_PI)); in main() 1079 GEN_DBL_TEST (tanh (2.0 * M_PI)); in main() [all …]
|
/third_party/jerryscript/tests/jerry/es2015/ |
D | math-tanh.js | 23 assert(isNaN(Math.tanh(NaN))); 24 assert(isSameZero(Math.tanh(p_zero), p_zero)); 25 assert(isSameZero(Math.tanh(n_zero), n_zero)); 26 assert(Math.tanh(Number.POSITIVE_INFINITY) === 1); 27 assert(Math.tanh(Number.NEGATIVE_INFINITY) === -1);
|
/third_party/boost/libs/math/test/ |
D | atanh_test.hpp | 23 using ::std::tanh; in atanh_error_evaluator() 33 T y = tanh(x); in atanh_error_evaluator() 47 using ::std::tanh; in BOOST_TEST_CASE_TEMPLATE_FUNCTION() 73 T y = tanh(x); in BOOST_TEST_CASE_TEMPLATE_FUNCTION() 98 using ::std::tanh; in atanh_manual_check() 113 float yf = tanh(xf); in atanh_manual_check() 114 double yd = tanh(xd); in atanh_manual_check() 116 long double yl = tanh(xl); in atanh_manual_check()
|
/third_party/mindspore/tests/st/ops/ascend/test_tbe_ops/ |
D | test_tanh.py | 29 self.tanh = P.Tanh() 32 return self.tanh(x) 42 tanh = Net() 43 tanh.set_train() 44 m = Model(tanh)
|
/third_party/skia/tests/sksl/intrinsics/ |
D | Tanh.glsl | 8 …return ((((((tanh(inputVal.x) == expected.x && tanh(inputVal.xy) == expected.xy) && tanh(inputVal.…
|
D | Tanh.metal | 18 …tanh(_uniforms.inputVal.x) == _uniforms.expected.x && all(tanh(_uniforms.inputVal.xy) == _uniforms…
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/ |
D | gelu_impl.cu | 28 float tanh_res = tanh(0.7978845608 * (x + 0.044715 * x * x * x)); in GeluKernel() 37 float tanh_res = tanh(__half2float(half(0.7978845608) * (x + half(0.044715) * x * x * x))); in GeluKernel() 48 tanh_res.x = tanh(tanh_param.x); in GeluKernel() 49 tanh_res.y = tanh(tanh_param.y); in GeluKernel() 79 T tanh_res = tanh(0.7978845608 * (x + 0.044715 * x * x * x)); in GeluGradKernel() 92 tanh_res.x = tanh(tanh_param.x); in GeluGradKernel() 93 tanh_res.y = tanh(tanh_param.y); in GeluGradKernel() 107 half tanh_res = __float2half_rn(tanh(__half2float(tanh_param))); in GeluGradKernel()
|
/third_party/python/Lib/test/ |
D | cmath_testcases.txt | 1580 -- For exp, cosh, sinh, tanh we limit tests to arguments whose 1932 -- tanh: Hyperbolic Tangent -- 1939 -- tanh0000 tanh 0.0 0.0 -> 0.0 0.0 1940 -- tanh0001 tanh 0.0 -0.0 -> 0.0 -0.0 1941 -- tanh0002 tanh -0.0 0.0 -> -0.0 0.0 1942 -- tanh0003 tanh -0.0 -0.0 -> -0.0 -0.0 1945 tanh0004 tanh -21.200500450664993 -1.6970729480342996 -> -1.0 1.9241352344849399e-19 1946 tanh0005 tanh -0.34158771504251928 -8.0848504951747131 -> -2.123711225855613 1.2827526782026006 1947 tanh0006 tanh -15.454144725193689 -0.23619582288265617 -> -0.99999999999993283 -3.4336684248260036e… 1948 tanh0007 tanh -7.6103163119661952 -0.7802748320307008 -> -0.99999999497219438 -4.9064845343755437e-… [all …]
|
/third_party/skia/third_party/externals/tint/test/intrinsics/gen/tanh/ |
D | 5724b3.wgsl.expected.glsl | 5 vec2 res = tanh(vec2(0.0f, 0.0f)); 35 vec2 res = tanh(vec2(0.0f, 0.0f)); 55 vec2 res = tanh(vec2(0.0f, 0.0f));
|
D | c15fdb.wgsl.expected.glsl | 5 float res = tanh(1.0f); 35 float res = tanh(1.0f); 55 float res = tanh(1.0f);
|
D | 5663c5.wgsl.expected.glsl | 5 vec4 res = tanh(vec4(0.0f, 0.0f, 0.0f, 0.0f)); 35 vec4 res = tanh(vec4(0.0f, 0.0f, 0.0f, 0.0f)); 55 vec4 res = tanh(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
D | 9f9fb9.wgsl.expected.glsl | 5 vec3 res = tanh(vec3(0.0f, 0.0f, 0.0f)); 35 vec3 res = tanh(vec3(0.0f, 0.0f, 0.0f)); 55 vec3 res = tanh(vec3(0.0f, 0.0f, 0.0f));
|
/third_party/mindspore/tests/ut/python/parallel/ |
D | test_hybird_parallel_activation.py | 62 self.tanh = P.Tanh().shard(strategy3) 65 out = self.tanh(self.matmul1(x, y)) 167 self.tanh = P.Tanh().shard(strategy3) 172 out = self.gelu(self.tanh(self.matmul1(x, y))) 196 self.tanh = P.Tanh().shard(strategy4) 201 out = self.gelu(self.tanh(self.matmul1(x, y))) 228 self.tanh = P.Tanh().shard(strategy4) 233 out = self.gelu(self.tanh(self.matmul1(x, y)))
|
/third_party/boost/boost/qvm/ |
D | math.hpp | 27 template <class T> T tanh( T ); 50 template <> BOOST_QVM_INLINE_TRIVIAL float tanh<float>( float x ) { return ::tanhf(x); } in tanh() function 72 template <> BOOST_QVM_INLINE_TRIVIAL double tanh<double>( double x ) { return ::tanh(x); } in tanh() function 94 …template <> BOOST_QVM_INLINE_TRIVIAL long double tanh<long double>( long double x ) { return ::tan… in tanh() function
|
/third_party/boost/libs/qvm/test/ |
D | math_test.cpp | 47 test1<float>(&boost::qvm::tanh<float>, &::tanhf); in main() 68 test1<double>(&boost::qvm::tanh<double>, &::tanh); in main() 89 test1<long double>(&boost::qvm::tanh<long double>, &::tanhl); in main()
|
/third_party/musl/porting/liteos_a/kernel/src/math/ |
D | tanhl.c | 6 return tanh(x); in tanhl() 46 return tanh(x); in tanhl()
|
/third_party/musl/src/math/ |
D | tanhl.c | 6 return tanh(x); in tanhl() 46 return tanh(x); in tanhl()
|
/third_party/boost/libs/math/test/float128/ |
D | test_std_lib.cpp | 96 …BOOST_CHECK_CLOSE_FRACTION(std::tanh(BOOST_FLOAT128_C(0.5)), BOOST_FLOAT128_C(0.462117157260009758… in BOOST_AUTO_TEST_CASE() 97 …BOOST_CHECK_CLOSE_FRACTION(std::tanh(BOOST_FLOAT128_C(-0.5)), BOOST_FLOAT128_C(-0.4621171572600097… in BOOST_AUTO_TEST_CASE() 98 …BOOST_CHECK_CLOSE_FRACTION(std::tanh(BOOST_FLOAT128_C(1.5)), BOOST_FLOAT128_C(0.905148253644866438… in BOOST_AUTO_TEST_CASE() 99 …BOOST_CHECK_CLOSE_FRACTION(std::tanh(BOOST_FLOAT128_C(-1.5)), BOOST_FLOAT128_C(-0.9051482536448664… in BOOST_AUTO_TEST_CASE() 100 …BOOST_CHECK_CLOSE_FRACTION(std::tanh(BOOST_FLOAT128_C(3.5)), BOOST_FLOAT128_C(0.998177897611198709… in BOOST_AUTO_TEST_CASE() 101 …BOOST_CHECK_CLOSE_FRACTION(std::tanh(BOOST_FLOAT128_C(-3.5)), BOOST_FLOAT128_C(-0.9981778976111987… in BOOST_AUTO_TEST_CASE() 102 BOOST_CHECK_EQUAL(std::tanh(BOOST_FLOAT128_C(0.0)), 0.0); in BOOST_AUTO_TEST_CASE() 229 …BOOST_CHECK_CLOSE_FRACTION(real(tanh(cm)), BOOST_FLOATMAX_C(0.989853240015864535514963496600761619… in BOOST_AUTO_TEST_CASE() 230 …BOOST_CHECK_CLOSE_FRACTION(imag(tanh(cm)), BOOST_FLOATMAX_C(0.008764045495134631601280624388444235… in BOOST_AUTO_TEST_CASE()
|
/third_party/skia/third_party/externals/tint/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/ |
D | 0-opt.wgsl | 11 dist1 = distance(tanh(x_30), (sinh(x_32) / cosh(x_34))); 13 dist2 = distance(tanh(x_38), vec4<f32>(0.761590004, 0.964030027, 0.995050013, 0.999329984));
|
/third_party/boost/boost/numeric/interval/ |
D | rounded_transc.hpp | 37 BOOST_NUMERIC_INTERVAL_new_func(tanh) 68 BOOST_NUMERIC_INTERVAL_new_func(tanh) 112 BOOST_NUMERIC_INTERVAL_new_func(tanh)
|
/third_party/mindspore/tests/ut/python/nn/ |
D | test_container.py | 94 tanh = nn.Tanh() 96 seq.append(tanh) 99 seq1 = nn.SequentialCell([relu, tanh])
|
/third_party/mindspore/tests/st/pynative/ |
D | test_pynative_mixed_precision_cells.py | 38 self.tanh = nn.Tanh() 43 y = self.tanh(x) 61 self.tanh = nn.Tanh() 66 y = self.tanh(x)
|