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

Method SetUp

tensorflow/lite/kernels/if_test.cc:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69class DynamicSubgraphIfTest : public ControlFlowOpTest {
70 protected:
71 void SetUp() override {
72 interpreter_->AddSubgraphs(2);
73 builder_->BuildAddSubgraph(interpreter_->subgraph(1));
74 builder_->BuildPadSubgraph(interpreter_->subgraph(2));
75 builder_->BuildIfSubgraph(&interpreter_->primary_subgraph());
76
77 interpreter_->ResizeInputTensor(interpreter_->inputs()[0], {1});
78 interpreter_->ResizeInputTensor(interpreter_->inputs()[1], {2});
79 interpreter_->ResizeInputTensor(interpreter_->inputs()[2], {1, 2});
80 ASSERT_EQ(interpreter_->AllocateTensors(), kTfLiteOk);
81
82 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[1]), {5, 7});
83 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[2]), {1, 2});
84 }
85};
86
87TEST_F(DynamicSubgraphIfTest, TestIfTrue) {

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected