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

Function TEST

tensorflow/lite/kernels/activations_test.cc:207–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205};
206
207TEST(FloatActivationsOpTest, Elu) {
208 FloatActivationsOpModel m(BuiltinOperator_ELU,
209 /*input=*/{TensorType_FLOAT32, {1, 2, 4, 1}});
210 m.SetInput({
211 0, -6, 2, -4, //
212 3, -2, 10, -0.1, //
213 });
214 m.Invoke();
215 EXPECT_THAT(m.GetOutput(), ElementsAreArray(ArrayFloatNear({
216 0.0, -0.997521, 2.0, -0.981684, //
217 3.0, -0.864665, 10.0, -0.0951626, //
218 })));
219}
220
221TEST(FloatActivationsOpTest, Relu) {
222 FloatActivationsOpModel m(BuiltinOperator_RELU,

Callers

nothing calls this directly

Calls 6

TestFloatHardSwishFunction · 0.85
ArrayFloatNearFunction · 0.70
SetInputMethod · 0.45
InvokeMethod · 0.45
GetOutputMethod · 0.45
SetAlphaMethod · 0.45

Tested by

no test coverage detected