Searched refs:FloatToQuantizedType (Results 1 – 3 of 3) sorted by relevance
/external/tensorflow/tensorflow/lite/micro/ |
D | micro_utils_test.cc | 23 using tflite::FloatToQuantizedType; in TF_LITE_MICRO_TEST() 25 TF_LITE_MICRO_EXPECT_EQ(0, FloatToQuantizedType<uint8_t>(0, 0.5, 0)); in TF_LITE_MICRO_TEST() 26 TF_LITE_MICRO_EXPECT_EQ(254, FloatToQuantizedType<uint8_t>(127, 0.5, 0)); in TF_LITE_MICRO_TEST() 27 TF_LITE_MICRO_EXPECT_EQ(255, FloatToQuantizedType<uint8_t>(127.5, 0.5, 0)); in TF_LITE_MICRO_TEST() 29 TF_LITE_MICRO_EXPECT_EQ(0, FloatToQuantizedType<uint8_t>(-10, 1.0, 10)); in TF_LITE_MICRO_TEST() 30 TF_LITE_MICRO_EXPECT_EQ(1, FloatToQuantizedType<uint8_t>(-9, 1.0, 10)); in TF_LITE_MICRO_TEST() 31 TF_LITE_MICRO_EXPECT_EQ(128, FloatToQuantizedType<uint8_t>(118, 1.0, 10)); in TF_LITE_MICRO_TEST() 32 TF_LITE_MICRO_EXPECT_EQ(253, FloatToQuantizedType<uint8_t>(243, 1.0, 10)); in TF_LITE_MICRO_TEST() 33 TF_LITE_MICRO_EXPECT_EQ(254, FloatToQuantizedType<uint8_t>(244, 1.0, 10)); in TF_LITE_MICRO_TEST() 34 TF_LITE_MICRO_EXPECT_EQ(255, FloatToQuantizedType<uint8_t>(245, 1.0, 10)); in TF_LITE_MICRO_TEST() [all …]
|
D | micro_utils.h | 35 T FloatToQuantizedType(const float value, const float scale, int zero_point) { in FloatToQuantizedType() function 69 output[i] = FloatToQuantizedType<T>(input[i], scale, zero_point); in Quantize()
|
/external/tensorflow/tensorflow/lite/micro/kernels/ |
D | activations.cc | 208 data->six_int8 = FloatToQuantizedType<int8_t>(6.0f, input->params.scale, in Relu6Prepare() 212 data->six_uint8 = FloatToQuantizedType<uint8_t>(6.0f, input->params.scale, in Relu6Prepare()
|