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

Function TEST

tensorflow/lite/kernels/elementwise_test.cc:59–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57};
58
59TEST(ElementWise, Sin) {
60 ElementWiseOpFloatModel m(BuiltinOperator_SIN, {1, 1, 4, 1});
61 m.PopulateTensor<float>(m.input(), {0, 3.1415926, -3.1415926, 1});
62 m.Invoke();
63 EXPECT_THAT(m.ExtractVector<float>(m.output()),
64 ElementsAreArray(ArrayFloatNear({0, 0, 0, 0.84147})));
65 EXPECT_THAT(m.GetTensorShape(m.output()), ElementsAreArray({1, 1, 4, 1}));
66}
67
68TEST(ElementWise, Cos) {
69 ElementWiseOpFloatModel m(BuiltinOperator_COS, {1, 1, 4, 1});

Callers

nothing calls this directly

Calls 5

ArrayFloatNearFunction · 0.70
outputMethod · 0.65
inputMethod · 0.45
InvokeMethod · 0.45
GetTensorShapeMethod · 0.45

Tested by

no test coverage detected