/external/tensorflow/tensorflow/lite/kernels/ |
D | resize_nearest_neighbor_test.cc | 91 ElementsAreArray(ArrayFloatNear({3, 3, 6}))); in TEST_P() 99 ElementsAreArray(ArrayFloatNear({3, 3, 6}))); in TEST_P() 107 ElementsAreArray(ArrayFloatNear({-3, -3, 6}))); in TEST_P() 115 ElementsAreArray(ArrayFloatNear({-3, -3, 6}))); in TEST_P() 123 ElementsAreArray(ArrayFloatNear({3, 3, 9}))); in TEST_P() 131 ElementsAreArray(ArrayFloatNear({3, 3, 9}))); in TEST_P() 139 ElementsAreArray(ArrayFloatNear({3, 3, -9}))); in TEST_P() 147 ElementsAreArray(ArrayFloatNear({3, 3, -9}))); in TEST_P() 157 EXPECT_THAT(m.GetOutput<float>(), ElementsAreArray(ArrayFloatNear({ in TEST_P() 171 EXPECT_THAT(m.GetOutput<uint8>(), ElementsAreArray(ArrayFloatNear({ in TEST_P() [all …]
|
D | resize_bilinear_test.cc | 88 ElementsAreArray(ArrayFloatNear({3, 5, 6}))); in TEST_P() 96 ElementsAreArray(ArrayFloatNear({3, 5, 6}))); in TEST_P() 104 ElementsAreArray(ArrayFloatNear({3, 5, 6}))); in TEST_P() 115 ElementsAreArray(ArrayFloatNear({3, 5, 6}))); in TEST_P() 124 ElementsAreArray(ArrayFloatNear({3, 7, 9}))); in TEST_P() 132 ElementsAreArray(ArrayFloatNear({3, 7, 9}))); in TEST_P() 140 ElementsAreArray(ArrayFloatNear({3, 7, 9}))); in TEST_P() 151 ElementsAreArray(ArrayFloatNear({3, 7, 9}))); in TEST_P() 162 EXPECT_THAT(m.GetOutput<float>(), ElementsAreArray(ArrayFloatNear({ in TEST_P() 176 EXPECT_THAT(m.GetOutput<uint8>(), ElementsAreArray(ArrayFloatNear({ in TEST_P() [all …]
|
D | detection_postprocess_test.cc | 170 ElementsAreArray(ArrayFloatNear( in TEST() 177 ElementsAreArray(ArrayFloatNear({1, 0, 0}, 1e-4))); in TEST() 182 ElementsAreArray(ArrayFloatNear({0.95, 0.9, 0.3}, 1e-4))); in TEST() 187 ElementsAreArray(ArrayFloatNear({3.0}, 1e-4))); in TEST() 235 ElementsAreArray(ArrayFloatNear({0.0, 0.0, 1.0, 1.0, // box #1 in TEST() 244 ElementsAreArray(ArrayFloatNear({0, 1}, 1e-4))); in TEST() 251 ElementsAreArray(ArrayFloatNear({0.9, 0.7}, 1e-4))); in TEST() 293 ElementsAreArray(ArrayFloatNear( in TEST() 300 ElementsAreArray(ArrayFloatNear({1, 0, 0}, 1e-1))); in TEST() 305 ElementsAreArray(ArrayFloatNear({0.95, 0.9, 0.3}, 1e-1))); in TEST() [all …]
|
D | activations_test.cc | 254 EXPECT_THAT(m.GetOutput(), ElementsAreArray(ArrayFloatNear({ in TEST() 275 ElementsAreArray(ArrayFloatNear( in TEST() 372 ElementsAreArray(ArrayFloatNear(float_ref_output_values))); in TestFloatHardSwish() 403 EXPECT_THAT(dequantized_output, ElementsAreArray(ArrayFloatNear( in TestQuantizedHardSwish() 507 EXPECT_THAT(m.GetOutput(), ElementsAreArray(ArrayFloatNear({ in TEST_P() 526 ElementsAreArray(ArrayFloatNear( in TEST() 548 ElementsAreArray(ArrayFloatNear( in TEST() 580 ElementsAreArray(ArrayFloatNear( in QuantizedActivationsOpTestLeakyRelu() 614 ElementsAreArray(ArrayFloatNear( in TEST() 637 ElementsAreArray(ArrayFloatNear( in TEST() [all …]
|
D | pooling_test.cc | 254 ElementsAreArray(ArrayFloatNear({2.75, 5.75}))); in TEST() 275 ElementsAreArray(ArrayFloatNear({0.0, 0.75}))); in TEST() 296 ElementsAreArray(ArrayFloatNear({-1.0, 0.75}))); in TEST() 306 ElementsAreArray(ArrayFloatNear({-1.0, -0.75}))); in TEST() 327 ElementsAreArray(ArrayFloatNear({0.0, 6.0}))); in TEST() 337 ElementsAreArray(ArrayFloatNear({2.75, 6.0}))); in TEST() 358 ArrayFloatNear({2.75, 5.0, 5.75, 5.5, 2.5, 6.0, 8.5, 7.0}))); in TEST() 379 ElementsAreArray(ArrayFloatNear({2.75, 5.0, 5.75}))); in TEST() 397 EXPECT_THAT(m.GetDequantizedOutput(), ElementsAreArray(ArrayFloatNear({16}))); in TEST() 420 ElementsAreArray(ArrayFloatNear( in TEST() [all …]
|
D | reduce_test.cc | 273 EXPECT_THAT(m.GetOutput<float>(), ElementsAreArray(ArrayFloatNear({12, 13}))); in TEST() 286 ElementsAreArray(ArrayFloatNear({10.5, 12.5, 14.5}))); in TEST() 311 ElementsAreArray(ArrayFloatNear({6, 7, 18, 19}))); in TEST() 324 ElementsAreArray(ArrayFloatNear({0.25098, 0.25098, 0.25098}, in TEST() 342 ElementsAreArray(ArrayFloatNear( in TEST() 359 ArrayFloatNear({0.235294, 0.313726}, kQuantizedTolerance))); in TEST() 369 EXPECT_THAT(m.GetOutput<float>(), ElementsAreArray(ArrayFloatNear({3.27}))); in TEST() 379 EXPECT_THAT(m.GetOutput<float>(), ElementsAreArray(ArrayFloatNear({3.}))); in TEST() 394 EXPECT_THAT(m.GetOutput<float>(), ElementsAreArray(ArrayFloatNear({12, 13}))); in TEST() 411 ElementsAreArray(ArrayFloatNear({1.5, 3.5, 5.5, 7.5, 9.5, 11.5, 13.5, in TEST() [all …]
|
D | mul_test.cc | 101 ElementsAreArray(ArrayFloatNear({-0.2, 0.04, 0.21, 0.4}))); in TEST() 112 ElementsAreArray(ArrayFloatNear({-0.2, 0.04, 0.21, 1.0}))); in TEST() 127 ElementsAreArray(ArrayFloatNear({-0.2, 0.04, 0.21, 0.4, 1.21, 0.2}))) in TEST() 144 ElementsAreArray(ArrayFloatNear({-0.2, 0.02, 0.07, 0.08, 0.11, 0.2}))) in TEST() 161 ElementsAreArray(ArrayFloatNear( in TEST() 196 ElementsAreArray(ArrayFloatNear(test_outputs[i], 0.0001f))) in TEST() 211 ElementsAreArray(ArrayFloatNear(test_outputs[i], 0.0001f))) in TEST() 227 ElementsAreArray(ArrayFloatNear({-0.2, 0.04, 0.07, 0.16}))) in TEST() 278 ElementsAreArray(ArrayFloatNear({-20, 2, 7, 8, 11, 20}))) in TEST() 293 ElementsAreArray(ArrayFloatNear({-0.48, 0.08, 0.81, 0.56}, in NoActivation() [all …]
|
D | gather_test.cc | 81 ElementsAreArray(ArrayFloatNear({0.7, 0.8, -2, 0.2}))); in TEST() 90 ElementsAreArray(ArrayFloatNear({0.7, 0.8}))); in TEST() 101 EXPECT_THAT(m.GetOutput<float>(), ElementsAreArray(ArrayFloatNear({2.0}))); in TEST() 110 EXPECT_THAT(m.GetOutput<float>(), ElementsAreArray(ArrayFloatNear({3.0}))); in TEST() 120 ElementsAreArray(ArrayFloatNear({2.0, 1.0}))); in TEST() 131 ElementsAreArray(ArrayFloatNear({-2, 0.2, 0.7, 0.8, -2, 0.2, 0.7, 0.8}))); in TEST() 140 ElementsAreArray(ArrayFloatNear({0.2, 0.8}))); in TEST() 151 ElementsAreArray(ArrayFloatNear({4, 5, 6, 1, 2, 3}))); in TEST() 162 EXPECT_THAT(m.GetOutput<float>(), ElementsAreArray(ArrayFloatNear({3, 4}))); in TEST() 174 ElementsAreArray(ArrayFloatNear({7, 8, 3, 4}))); in TEST() [all …]
|
D | embedding_lookup_test.cc | 115 ElementsAreArray(ArrayFloatNear({ in TEST() 134 ElementsAreArray(ArrayFloatNear( in TEST() 155 ElementsAreArray(ArrayFloatNear( in TEST() 176 ElementsAreArray(ArrayFloatNear( in TEST() 197 ElementsAreArray(ArrayFloatNear( in TEST() 218 ElementsAreArray(ArrayFloatNear( in TEST() 239 ElementsAreArray(ArrayFloatNear( in TEST()
|
D | l2norm_test.cc | 91 ElementsAreArray(ArrayFloatNear({0, 0, 0, 0, 0, 0}))); in TEST() 127 ElementsAreArray(ArrayFloatNear({0, 0, 0, 0, 0, 0}, 0.1))); in TEST() 139 ArrayFloatNear({-0.55, 0.3, 0.35, 0.6, -0.35, 0.05}, 0.1))); in TEST() 152 ArrayFloatNear({-0.55, 0.3, 0.35, 0.6, -0.35, 0.05}, 0.1))); in TEST() 163 ElementsAreArray(ArrayFloatNear({0, 0, 0, 0, 0, 0}, 0.1))); in TEST() 183 ElementsAreArray(ArrayFloatNear( in TEST() 208 ElementsAreArray(ArrayFloatNear( in TEST()
|
D | complex_support_test.cc | 67 EXPECT_THAT(m.GetOutput(), testing::ElementsAreArray(ArrayFloatNear( in TEST() 86 EXPECT_THAT(m.GetOutput(), testing::ElementsAreArray(ArrayFloatNear( in TEST() 128 EXPECT_THAT(m.GetOutput(), testing::ElementsAreArray(ArrayFloatNear( in TEST() 147 EXPECT_THAT(m.GetOutput(), testing::ElementsAreArray(ArrayFloatNear( in TEST() 206 EXPECT_THAT(m.GetOutput(), testing::ElementsAreArray(ArrayFloatNear( in TEST() 227 EXPECT_THAT(m.GetOutput(), testing::ElementsAreArray(ArrayFloatNear( in TEST()
|
D | local_response_norm_test.cc | 62 ElementsAreArray(ArrayFloatNear({-0.55, 0.3, 0.35, 0.6, -0.35, 0.05}))); in TEST() 71 EXPECT_THAT(m.GetOutput(), ElementsAreArray(ArrayFloatNear( in TEST() 83 ElementsAreArray(ArrayFloatNear({-0.22, 0.12, 0.14, 0.24, -0.14, 0.02}))); in TEST() 93 ElementsAreArray(ArrayFloatNear( in TEST()
|
D | div_test.cc | 93 ElementsAreArray(ArrayFloatNear({-0.4, 1.0, 0.8, 1.6}))); in TEST() 104 ElementsAreArray(ArrayFloatNear({-1.0, 1.0, 0.8, 1.0}))); in TEST() 119 ElementsAreArray(ArrayFloatNear({-20.0, 1.0, 0.5, 1.6, -1.0, 20.0}))) in TEST() 136 ElementsAreArray(ArrayFloatNear( in TEST() 153 ElementsAreArray(ArrayFloatNear( in TEST() 221 ElementsAreArray(ArrayFloatNear({1.0, -0.5, 0.375, 0.7}, in QuantizedNoActivation() 248 ElementsAreArray(ArrayFloatNear(results[i], kQuantizedTolerance))) in QuantizedActivationRELU_N1_TO_1() 274 ElementsAreArray(ArrayFloatNear( in QuantizedVariousInputShapes() 298 ElementsAreArray(ArrayFloatNear( in QuantizedWithBroadcast()
|
D | sub_test.cc | 123 ElementsAreArray(ArrayFloatNear({-2.1, 0.0, 1.4, -0.3}))); in TEST() 134 ElementsAreArray(ArrayFloatNear({-1.0, 0.0, 1.0, -0.3}))); in TEST() 149 ElementsAreArray(ArrayFloatNear({-2.1, 0.0, 1.4, -0.3, 0.0, 1.9}))) in TEST() 166 ElementsAreArray(ArrayFloatNear({-2.5, -0.3, 1.2, 0.0, -1.6, 1.5}))) in TEST() 182 ElementsAreArray(ArrayFloatNear({-2.5, -0.3, 1.2, 0.0, -1.6, 1.5}))) in TEST() 233 ElementsAreArray(ArrayFloatNear({-21, 1, 6, 7, 10, 19}))) in TEST() 284 ElementsAreArray(ArrayFloatNear({-21, 1, 6, 7, 10, 19}))) in TEST() 309 ElementsAreArray(ArrayFloatNear(results[i], kQuantizedTolerance))) in QuantizedTestsNoActivation() 345 ElementsAreArray(ArrayFloatNear(results[i], kQuantizedTolerance))) in QuantizedTestsActivationRELU_N1_TO_1() 377 ElementsAreArray(ArrayFloatNear( in QuantizedVariousInputShapes() [all …]
|
D | elementwise_test.cc | 129 ElementsAreArray(ArrayFloatNear({0, 0, 0, 0.84147}))); in TEST() 138 ElementsAreArray(ArrayFloatNear({1, -1, -1, 0.54030}))); in TEST() 147 ElementsAreArray(ArrayFloatNear({0, 1.14473, 0, 0}))); in TEST() 191 ElementsAreArray(ArrayFloatNear(abs_data, kInputScale))); in TEST() 219 ElementsAreArray(ArrayFloatNear(abs_data, kInputScale))); in TEST() 235 ElementsAreArray(ArrayFloatNear(abs_data, kQuantizedTolerance))); in TEST() 243 ElementsAreArray(ArrayFloatNear({0, 1, 1.41421, 2}))); in TEST() 252 ElementsAreArray(ArrayFloatNear({1, 0.7071, 0.5, 0.33333}))); in TEST() 287 ElementsAreArray(ArrayFloatNear(rsqrt_data, kInputScale))); in TEST() 321 ElementsAreArray(ArrayFloatNear(rsqrt_data, kInputScale))); in TEST() [all …]
|
D | add_test.cc | 162 ElementsAreArray(ArrayFloatNear({-1.9, 0.3, 0.8, 0.9, 1.2, 2.1}))) in TEST() 177 ElementsAreArray(ArrayFloatNear({0.2, 0.3, 0.3, 0.4, 0.4, 0.5, in TEST() 209 ElementsAreArray(ArrayFloatNear(test_outputs[i], 0.0001f))) in TEST() 224 ElementsAreArray(ArrayFloatNear(test_outputs[i], 0.0001f))) in TEST() 275 ElementsAreArray(ArrayFloatNear({-19, 3, 8, 9, 12, 21}))) in TEST() 317 ElementsAreArray(ArrayFloatNear(results[i], kQuantizedTolerance))) in QuantizedTestsNoActivation() 351 ElementsAreArray(ArrayFloatNear(results[i], kQuantizedTolerance))) in TEST() 375 ElementsAreArray(ArrayFloatNear(results[i], kQuantizedTolerance))) in QuantizedTestsActivationRELU_N1_TO_1() 404 ElementsAreArray(ArrayFloatNear({-1.9, 0.5, 1.0, 1.3, 2.2, 2.1}, in QuantizedVariousInputShapes() 434 ElementsAreArray(ArrayFloatNear({-1.9f, 0.3f, 0.8f, 0.9f, 1.2f, 2.1f}, in QuantizedWithScalarBroadcast() [all …]
|
/external/tensorflow/tensorflow/lite/toco/graph_transformations/tests/ |
D | lstm_utils_test.cc | 30 std::vector<testing::Matcher<float>> ArrayFloatNear( in ArrayFloatNear() function 120 EXPECT_THAT(GetDstBuffer()->data, ElementsAreArray(ArrayFloatNear(expected))); in TEST_F() 130 EXPECT_THAT(GetDstBuffer()->data, ElementsAreArray(ArrayFloatNear(expected))); in TEST_F() 140 EXPECT_THAT(GetDstBuffer()->data, ElementsAreArray(ArrayFloatNear(expected))); in TEST_F() 150 EXPECT_THAT(GetDstBuffer()->data, ElementsAreArray(ArrayFloatNear(expected))); in TEST_F() 168 EXPECT_THAT(GetDstBuffer()->data, ElementsAreArray(ArrayFloatNear(expected))); in TEST_F() 179 EXPECT_THAT(GetDstBuffer()->data, ElementsAreArray(ArrayFloatNear(expected))); in TEST_F() 190 EXPECT_THAT(GetDstBuffer()->data, ElementsAreArray(ArrayFloatNear(expected))); in TEST_F() 201 EXPECT_THAT(GetDstBuffer()->data, ElementsAreArray(ArrayFloatNear(expected))); in TEST_F() 224 EXPECT_THAT(GetDstBuffer()->data, ElementsAreArray(ArrayFloatNear(expected))); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/lite/delegates/hexagon/builders/tests/ |
D | resize_test.cc | 83 ElementsAreArray(ArrayFloatNear({3, 5, 6}, /*max_abs_error=*/1))); in TEST() 93 ElementsAreArray(ArrayFloatNear({3.01176, 3.01176, 6.02353}, in TEST() 104 ElementsAreArray(ArrayFloatNear({3, 7, 9}, /*max_abs_error=*/1))); in TEST() 114 ElementsAreArray(ArrayFloatNear({3.01961, 3.01961, 8.97255}, in TEST() 128 ElementsAreArray(ArrayFloatNear( in TEST() 147 ElementsAreArray(ArrayFloatNear( in TEST() 167 EXPECT_THAT(m.GetDequantizedOutput<int8_t>(), ElementsAreArray(ArrayFloatNear( in TEST() 191 ElementsAreArray(ArrayFloatNear( in TEST() 216 ElementsAreArray(ArrayFloatNear({2, 4, 6, // in TEST() 238 ElementsAreArray(ArrayFloatNear({3, 5, 6, // in TEST() [all …]
|
D | conv_test.cc | 166 ElementsAreArray(ArrayFloatNear( in TEST() 200 ElementsAreArray(ArrayFloatNear( in TEST() 237 ElementsAreArray(ArrayFloatNear( in TEST() 289 ElementsAreArray(ArrayFloatNear({31, 56, -57, -44}, 1e-5))); in TEST() 334 ElementsAreArray(ArrayFloatNear({31, 64, -57, -46}, 0.6f))); in TEST() 425 ElementsAreArray(ArrayFloatNear(reference_output, 1e-5))); in TEST() 465 ElementsAreArray(ArrayFloatNear(reference_output, 1e-5))); in TEST() 507 ElementsAreArray(ArrayFloatNear(reference_output, 1e-5))); in TEST() 549 ElementsAreArray(ArrayFloatNear({43, 48, 40, 52, 3, -4, 4, 4}, 0.6f))); in TEST() 596 ElementsAreArray(ArrayFloatNear(reference_output, 1e-2))); in TEST() [all …]
|
D | slice_test.cc | 66 ElementsAreArray(ArrayFloatNear({2, 3}, 0.1))); in TEST() 81 ElementsAreArray(ArrayFloatNear(reference_output, 0.1))); in TEST() 96 ElementsAreArray(ArrayFloatNear(reference_output, 0.1))); in TEST() 112 ElementsAreArray(ArrayFloatNear(reference_output, 0.1))); in TEST() 128 ElementsAreArray(ArrayFloatNear(reference_output, 0.1))); in TEST() 144 ElementsAreArray(ArrayFloatNear(reference_output, 0.1))); in TEST() 160 ElementsAreArray(ArrayFloatNear(reference_output, 0.1))); in TEST()
|
D | transpose_conv_test.cc | 125 ElementsAreArray(ArrayFloatNear({28, 64, 84, 76, 100, 192, 236, 200, 208, in TEST() 149 ElementsAreArray(ArrayFloatNear( in TEST() 174 ElementsAreArray(ArrayFloatNear( in TEST() 195 ElementsAreArray(ArrayFloatNear({28, 62, 82, 76, 98, 192, 236, 198, 206, in TEST() 224 ElementsAreArray(ArrayFloatNear( in TEST() 246 ElementsAreArray(ArrayFloatNear({32, 64, 84, 76, 100, 192, 240, 200, 208, in TEST() 267 ElementsAreArray(ArrayFloatNear({30, 62, 84, 76, 100, 192, 236, 198, 206, in TEST()
|
D | matmul_test.cc | 135 ElementsAreArray(ArrayFloatNear(reference_output))); in TEST_P() 163 ElementsAreArray(ArrayFloatNear(reference_output))); in TEST_P() 190 ElementsAreArray(ArrayFloatNear(reference_output))); in TEST_P() 217 ElementsAreArray(ArrayFloatNear(reference_output))); in TEST_P() 245 ElementsAreArray(ArrayFloatNear(reference_output))); in TEST_P() 273 ElementsAreArray(ArrayFloatNear(reference_output))); in TEST_P() 309 ElementsAreArray(ArrayFloatNear(reference_output))); in TEST()
|
D | softmax_test.cc | 62 ElementsAreArray(ArrayFloatNear( in TEST() 81 ElementsAreArray(ArrayFloatNear( in TEST() 100 ElementsAreArray(ArrayFloatNear( in TEST() 118 EXPECT_THAT(m.GetDequantizedOutput<int8_t>(), ElementsAreArray(ArrayFloatNear( in TEST()
|
D | l2_norm_test.cc | 70 ElementsAreArray(ArrayFloatNear({0, 0, 0, 0, 0, 0}, 0.1))); in TEST() 79 ElementsAreArray(ArrayFloatNear({0, 0, 0, 0, 0, 0}, 0.1))); in TEST() 93 ElementsAreArray(ArrayFloatNear( in TEST() 113 ElementsAreArray(ArrayFloatNear( in TEST()
|
/external/tensorflow/tensorflow/lite/micro/kernels/ |
D | div_test.cc | 91 ElementsAreArray(ArrayFloatNear({-0.4, 1.0, 0.8, 1.6}))); in TEST() 102 ElementsAreArray(ArrayFloatNear({-1.0, 1.0, 0.8, 1.0}))); in TEST() 117 ElementsAreArray(ArrayFloatNear({-20.0, 1.0, 0.5, 1.6, -1.0, 20.0}))) in TEST() 134 ElementsAreArray(ArrayFloatNear( in TEST() 151 ElementsAreArray(ArrayFloatNear( in TEST() 219 ElementsAreArray(ArrayFloatNear({1.0, -0.5, 0.375, 0.7}, in QuantizedNoActivation() 246 ElementsAreArray(ArrayFloatNear(results[i], kQuantizedTolerance))) in QuantizedActivationRELU_N1_TO_1() 272 ElementsAreArray(ArrayFloatNear( in QuantizedVariousInputShapes() 296 ElementsAreArray(ArrayFloatNear( in QuantizedWithBroadcast()
|