Searched refs:FloatToSymmetricQuantizedType (Results 1 – 2 of 2) sorted by relevance
/external/tensorflow/tensorflow/lite/micro/ |
D | micro_utils_test.cc | 56 using tflite::FloatToSymmetricQuantizedType; in TF_LITE_MICRO_TEST() 58 TF_LITE_MICRO_EXPECT_EQ(2, FloatToSymmetricQuantizedType<int8_t>(1, 0.5)); in TF_LITE_MICRO_TEST() 59 TF_LITE_MICRO_EXPECT_EQ(4, FloatToSymmetricQuantizedType<int8_t>(2, 0.5)); in TF_LITE_MICRO_TEST() 60 TF_LITE_MICRO_EXPECT_EQ(6, FloatToSymmetricQuantizedType<int8_t>(3, 0.5)); in TF_LITE_MICRO_TEST() 61 TF_LITE_MICRO_EXPECT_EQ(-10, FloatToSymmetricQuantizedType<int8_t>(-5, 0.5)); in TF_LITE_MICRO_TEST() 63 FloatToSymmetricQuantizedType<int8_t>(-64, 0.5)); in TF_LITE_MICRO_TEST() 65 FloatToSymmetricQuantizedType<int8_t>(63.5, 0.5)); in TF_LITE_MICRO_TEST() 67 TF_LITE_MICRO_EXPECT_EQ(1, FloatToSymmetricQuantizedType<int8_t>(1, 1.0)); in TF_LITE_MICRO_TEST() 68 TF_LITE_MICRO_EXPECT_EQ(0, FloatToSymmetricQuantizedType<int8_t>(0, 1.0)); in TF_LITE_MICRO_TEST() 69 TF_LITE_MICRO_EXPECT_EQ(127, FloatToSymmetricQuantizedType<int8_t>(127, 1.0)); in TF_LITE_MICRO_TEST() [all …]
|
D | micro_utils.h | 45 T FloatToSymmetricQuantizedType(const float value, const float scale) { in FloatToSymmetricQuantizedType() function 77 output[i] = FloatToSymmetricQuantizedType<T>(input[i], scale); in SymmetricQuantize() 88 output[i * elements_per_channel + j] = FloatToSymmetricQuantizedType<T>( in SymmetricPerChannelQuantize()
|