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

Method BuildSubGraphs

tensorflow/lite/toco/tflite/import_test.cc:103–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101 }
102
103 Offset<Vector<Offset<::tflite::SubGraph>>> BuildSubGraphs(
104 Offset<Vector<Offset<::tflite::Tensor>>> tensors,
105 Offset<Vector<Offset<::tflite::Operator>>> operators,
106 int num_sub_graphs = 1) {
107 std::vector<int32_t> inputs = {0};
108 std::vector<int32_t> outputs = {1};
109 std::vector<Offset<::tflite::SubGraph>> v;
110 for (int i = 0; i < num_sub_graphs; ++i) {
111 v.push_back(::tflite::CreateSubGraph(
112 builder_, tensors, builder_.CreateVector(inputs),
113 builder_.CreateVector(outputs), operators,
114 builder_.CreateString("subgraph")));
115 }
116 return builder_.CreateVector(v);
117 }
118
119 // This is a very simplistic model. We are not interested in testing all the
120 // details here, since tf.mini's testing framework will be exercising all the

Callers

nothing calls this directly

Calls 3

CreateSubGraphFunction · 0.85
CreateVectorMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected