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

Function TEST

tensorflow/lite/delegates/nnapi/nnapi_delegate_test.cc:162–170  ·  view source on GitHub ↗

Do a test with the NN API using no activation.

Source from the content-addressed store, hash-verified

160
161// Do a test with the NN API using no activation.
162TEST(NNAPIDelegate, AddWithNoActivation) {
163 FloatAddOpModel m({TensorType_FLOAT32, {1, 2, 2, 1}},
164 {TensorType_FLOAT32, {1, 2, 2, 1}},
165 {TensorType_FLOAT32, {}}, ActivationFunctionType_NONE);
166 m.PopulateTensor<float>(m.input1(), {-2.0, 0.2, 0.7, 0.8});
167 m.PopulateTensor<float>(m.input2(), {0.1, 0.2, 0.3, 0.5});
168 m.Invoke();
169 EXPECT_THAT(m.GetOutput(), ElementsAreArray({-1.9, 0.4, 1.0, 1.3}));
170}
171
172// Do a test with scalar input using no activation.
173TEST(NNAPIDelegate, AddScalarWithNoActivation) {

Callers 1

Calls 15

CaptureStderrClass · 0.85
GetDelegateMethod · 0.80
RegisterNnapiMemoryMethod · 0.80
GetQuantizedOutputMethod · 0.80
outputMethod · 0.65
NnApiImplementationFunction · 0.50
HasSubstrFunction · 0.50
ArrayFloatNearFunction · 0.50
input1Method · 0.45
input2Method · 0.45
InvokeMethod · 0.45
GetOutputMethod · 0.45

Tested by

no test coverage detected