MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/lite/kernels/dequantize_test.cc:69–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67};
68
69TEST(DequantizeOpTest, Uint8) {
70 // [-63.5, 64] -> scale=0.5 zero_point=127 for UINT8
71 DequantizeOpModel m(TensorType_UINT8, {2, 5}, 0.5, 127, 1);
72
73 m.SetInput<uint8_t>({0, 1, 2, 3, 4, 251, 252, 253, 254, 255});
74 m.Invoke();
75 EXPECT_THAT(m.GetOutput(),
76 ElementsAreArray(ArrayFloatNear(
77 {-63.5, -63, -62.5, -62, -61.5, 62, 62.5, 63, 63.5, 64})));
78}
79
80TEST(DequantizeOpTest, Int8) {
81 // [-63.5, 64] -> scale=0.5, zero_point=1 for INT8

Callers

nothing calls this directly

Calls 6

ArrayFloatNearFunction · 0.70
InvokeMethod · 0.45
GetOutputMethod · 0.45
PopulateTensorMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected