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

Function TEST

tensorflow/lite/kernels/sub_test.cc:89–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89TEST(FloatSubOpModel, NoActivation) {
90 FloatSubOpModel m({TensorType_FLOAT32, {1, 2, 2, 1}},
91 {TensorType_FLOAT32, {1, 2, 2, 1}},
92 {TensorType_FLOAT32, {}}, ActivationFunctionType_NONE);
93 m.PopulateTensor<float>(m.input1(), {-2.0, 0.2, 1.7, 0.5});
94 m.PopulateTensor<float>(m.input2(), {0.1, 0.2, 0.3, 0.8});
95 m.Invoke();
96 EXPECT_THAT(m.GetOutput(),
97 ElementsAreArray(ArrayFloatNear({-2.1, 0.0, 1.4, -0.3})));
98}
99
100TEST(FloatSubOpModel, ActivationRELU_N1_TO_1) {
101 FloatSubOpModel m(

Callers

nothing calls this directly

Calls 9

ArrayFloatNearFunction · 0.70
GetToleranceInt16Function · 0.70
maxFunction · 0.50
input1Method · 0.45
input2Method · 0.45
InvokeMethod · 0.45
GetOutputMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected