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

Method SetUp

tensorflow/lite/kernels/if_test.cc:37–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35class SimpleIfTest : public ControlFlowOpTest {
36 protected:
37 void SetUp() override {
38 interpreter_->AddSubgraphs(2);
39 builder_->BuildAddSubgraph(interpreter_->subgraph(1));
40 builder_->BuildMulSubgraph(interpreter_->subgraph(2));
41 builder_->BuildIfSubgraph(&interpreter_->primary_subgraph());
42
43 interpreter_->ResizeInputTensor(interpreter_->inputs()[0], {1});
44 interpreter_->ResizeInputTensor(interpreter_->inputs()[1], {2});
45 interpreter_->ResizeInputTensor(interpreter_->inputs()[2], {1, 2});
46 ASSERT_EQ(interpreter_->AllocateTensors(), kTfLiteOk);
47
48 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[1]), {5, 7});
49 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[2]), {1, 2});
50 }
51};
52
53TEST_F(SimpleIfTest, TestIfTrue) {

Callers

nothing calls this directly

Calls 10

FillIntTensorFunction · 0.85
AddSubgraphsMethod · 0.80
BuildAddSubgraphMethod · 0.80
subgraphMethod · 0.80
BuildMulSubgraphMethod · 0.80
BuildIfSubgraphMethod · 0.80
ResizeInputTensorMethod · 0.45
inputsMethod · 0.45
AllocateTensorsMethod · 0.45
tensorMethod · 0.45

Tested by

no test coverage detected