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

Function TEST

tensorflow/lite/kernels/zeros_like_test.cc:44–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42};
43
44TEST(ZerosLikeOpModel, ZerosLikeFloat) {
45 ZerosLikeOpModel m({TensorType_FLOAT32, {2, 3}});
46 m.PopulateTensor<float>(m.input(), {-2.0, -1.0, 0.0, 1.0, 2.0, 3.0});
47 m.Invoke();
48 EXPECT_THAT(m.ExtractVector<float>(m.output()),
49 ElementsAreArray({0.0, 0.0, 0.0, 0.0, 0.0, 0.0}));
50 EXPECT_THAT(m.GetTensorShape(m.output()), ElementsAreArray({2, 3}));
51}
52
53TEST(ZerosLikeOpModel, ZerosLikeInt32) {
54 ZerosLikeOpModel m({TensorType_INT32, {1, 2, 2, 1}});

Callers

nothing calls this directly

Calls 5

InvokeUncheckedMethod · 0.80
outputMethod · 0.65
inputMethod · 0.45
InvokeMethod · 0.45
GetTensorShapeMethod · 0.45

Tested by

no test coverage detected