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

Function TEST

tensorflow/lite/kernels/squeeze_test.cc:59–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57};
58
59TEST(FloatSqueezeOpTest, SqueezeAll) {
60 std::initializer_list<float> data = {
61 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0,
62 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0};
63 FloatSqueezeOpModel m({TensorType_FLOAT32, {1, 24, 1}},
64 {TensorType_FLOAT32, {24}}, {});
65 m.SetInput(data);
66 m.Invoke();
67 EXPECT_THAT(m.GetOutputShape(), ElementsAreArray({24}));
68 EXPECT_THAT(
69 m.GetOutput(),
70 ElementsAreArray({1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0,
71 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0,
72 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0}));
73}
74
75TEST(FloatSqueezeOpTest, SqueezeSelectedAxis) {
76 std::initializer_list<float> data = {

Callers

nothing calls this directly

Calls 5

IsEmptyFunction · 0.85
SetInputMethod · 0.45
InvokeMethod · 0.45
GetOutputShapeMethod · 0.45
GetOutputMethod · 0.45

Tested by

no test coverage detected