Home
last modified time | relevance | path

Searched refs:subgraphs (Results 1 – 25 of 246) sorted by relevance

12345678910

/external/tensorflow/tensorflow/lite/tools/optimize/
Dquantization_wrapper_utils_custom_test.cc50 model->subgraphs.push_back(std::move(subgraph)); in TEST()
60 model->subgraphs[0]->tensors.push_back(std::move(tensor)); in TEST()
62 model->subgraphs[0]->operators.push_back(std::move(lstm_op)); in TEST()
72 EXPECT_EQ(model->subgraphs.size(), 1); in TEST()
73 EXPECT_EQ(model->subgraphs[0]->operators.size(), 1); in TEST()
74 EXPECT_EQ(model->subgraphs[0]->tensors.size(), 33); in TEST()
79 EXPECT_EQ(model->subgraphs[0]->tensors[0]->name, "lstm_tensor0"); in TEST()
80 EXPECT_EQ(model->subgraphs[0]->tensors[21]->name, "intermediate_0_0"); in TEST()
81 EXPECT_EQ(model->subgraphs[0]->tensors[22]->name, "intermediate_0_1"); in TEST()
82 EXPECT_EQ(model->subgraphs[0]->tensors[23]->name, "intermediate_0_2"); in TEST()
[all …]
Dmodify_model_interface_test.cc44 model->subgraphs.push_back(std::move(subgraph)); in CreateQuantizedModelSingleInputOutput()
75 model->subgraphs[0]->operators.push_back(std::move(quant_op)); in CreateQuantizedModelSingleInputOutput()
76 model->subgraphs[0]->operators.push_back(std::move(fc_op)); in CreateQuantizedModelSingleInputOutput()
77 model->subgraphs[0]->operators.push_back(std::move(dequant_op)); in CreateQuantizedModelSingleInputOutput()
84 model->subgraphs[0]->inputs = {0}; in CreateQuantizedModelSingleInputOutput()
85 model->subgraphs[0]->outputs = {3}; in CreateQuantizedModelSingleInputOutput()
114 model->subgraphs[0]->tensors.push_back(std::move(tensor_0)); in CreateQuantizedModelSingleInputOutput()
115 model->subgraphs[0]->tensors.push_back(std::move(tensor_1)); in CreateQuantizedModelSingleInputOutput()
116 model->subgraphs[0]->tensors.push_back(std::move(tensor_2)); in CreateQuantizedModelSingleInputOutput()
117 model->subgraphs[0]->tensors.push_back(std::move(tensor_3)); in CreateQuantizedModelSingleInputOutput()
[all …]
Dquantization_wrapper_utils_test.cc51 model->subgraphs.push_back(std::move(subgraph)); in TEST()
61 model->subgraphs[0]->tensors.push_back(std::move(tensor)); in TEST()
63 model->subgraphs[0]->operators.push_back(std::move(lstm_op)); in TEST()
73 EXPECT_EQ(model->subgraphs.size(), 1); in TEST()
74 EXPECT_EQ(model->subgraphs[0]->operators.size(), 1); in TEST()
75 EXPECT_EQ(model->subgraphs[0]->tensors.size(), 26); in TEST()
80 EXPECT_EQ(model->subgraphs[0]->tensors[0]->name, "lstm_tensor0"); in TEST()
81 EXPECT_EQ(model->subgraphs[0]->tensors[21]->name, "intermediate_0_0"); in TEST()
82 EXPECT_EQ(model->subgraphs[0]->tensors[22]->name, "intermediate_0_1"); in TEST()
83 EXPECT_EQ(model->subgraphs[0]->tensors[23]->name, "intermediate_0_2"); in TEST()
[all …]
Dquantize_weights_test.cc98 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in IsModelInputOrOutput()
100 const auto subgraph = model->subgraphs()->Get(subgraph_idx); in IsModelInputOrOutput()
119 const auto subgraph = model->subgraphs()->Get(subgraph_idx); in GetProducerOpCode()
160 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in TEST_F()
162 const auto quantized_graph = output_model->subgraphs()->Get(subgraph_idx); in TEST_F()
163 const auto float_graph = model_->subgraphs()->Get(subgraph_idx); in TEST_F()
192 ASSERT_EQ(output_model->subgraphs()->size(), model_->subgraphs()->size()); in TEST_F()
193 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in TEST_F()
195 const auto quantized_graph = output_model->subgraphs()->Get(subgraph_idx); in TEST_F()
196 const auto float_graph = model_->subgraphs()->Get(subgraph_idx); in TEST_F()
[all …]
Dquantization_utils_test.cc539 ASSERT_TRUE(readonly_model->subgraphs()); in TEST_F()
540 ASSERT_GE(readonly_model->subgraphs()->size(), 1); in TEST_F()
543 auto subgraph = model.subgraphs[0].get(); in TEST_F()
589 ASSERT_TRUE(readonly_model->subgraphs()); in TEST_F()
590 ASSERT_GE(readonly_model->subgraphs()->size(), 1); in TEST_F()
593 auto subgraph = model.subgraphs[0].get(); in TEST_F()
624 ASSERT_TRUE(readonly_model->subgraphs()); in TEST_F()
625 ASSERT_GE(readonly_model->subgraphs()->size(), 1); in TEST_F()
628 auto subgraph = model.subgraphs[0].get(); in TEST_F()
664 model->subgraphs.push_back(std::move(subgraph)); in TEST_F()
[all …]
Dquantize_model_test.cc93 ASSERT_EQ(model.subgraphs.size(), expected_model.subgraphs.size()); in ExpectSameModels()
94 for (size_t subgraph_idx = 0; subgraph_idx < model.subgraphs.size(); in ExpectSameModels()
96 const auto graph = model.subgraphs[subgraph_idx].get(); in ExpectSameModels()
97 const auto expected_graph = expected_model.subgraphs[subgraph_idx].get(); in ExpectSameModels()
164 ASSERT_EQ(model_.subgraphs.size(), readonly_model_->subgraphs()->size()); in TEST_P()
166 ASSERT_EQ(model_.subgraphs.size(), readonly_model_->subgraphs()->size()); in TEST_P()
167 for (size_t subgraph_idx = 0; subgraph_idx < model_.subgraphs.size(); in TEST_P()
169 const auto quantized_graph = model_.subgraphs[subgraph_idx].get(); in TEST_P()
170 const auto float_graph = readonly_model_->subgraphs()->Get(subgraph_idx); in TEST_P()
189 ASSERT_EQ(model_.subgraphs.size(), readonly_model_->subgraphs()->size()); in TEST_P()
[all …]
Dquantization_wrapper_utils.cc50 for (int subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in IntermediateTensorExists()
52 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in IntermediateTensorExists()
80 if (model->subgraphs.size() == 1 && model->subgraphs[0]->operators.empty()) { in AddIntermediateTensorsToFusedOp()
88 for (int subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in AddIntermediateTensorsToFusedOp()
90 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in AddIntermediateTensorsToFusedOp()
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/lite/
Dquantize_weights_test.cc108 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in IsModelInputOrOutput()
110 const auto subgraph = model->subgraphs()->Get(subgraph_idx); in IsModelInputOrOutput()
128 const auto subgraph = model->subgraphs()->Get(subgraph_idx); in GetProducerOpCode()
230 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in TEST_F()
232 const auto quantized_graph = output_model->subgraphs()->Get(subgraph_idx); in TEST_F()
233 const auto float_graph = model_->subgraphs()->Get(subgraph_idx); in TEST_F()
261 ASSERT_EQ(output_model->subgraphs()->size(), model_->subgraphs()->size()); in TEST_F()
262 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in TEST_F()
264 const auto quantized_graph = output_model->subgraphs()->Get(subgraph_idx); in TEST_F()
265 const auto float_graph = model_->subgraphs()->Get(subgraph_idx); in TEST_F()
[all …]
Dquantize_model_test.cc196 ASSERT_EQ(model.subgraphs.size(), expected_model.subgraphs.size()); in ExpectSameModels()
197 for (size_t subgraph_idx = 0; subgraph_idx < model.subgraphs.size(); in ExpectSameModels()
199 const auto graph = model.subgraphs[subgraph_idx].get(); in ExpectSameModels()
200 const auto expected_graph = expected_model.subgraphs[subgraph_idx].get(); in ExpectSameModels()
235 auto& subgraph = model_.subgraphs[0]; in QuantizeConvModelTest()
294 for (const auto& subgraph : model_.subgraphs) { in TEST_P()
340 const auto& subgraph = model_.subgraphs[subgraph_idx]; in TEST_F()
342 readonly_model_->subgraphs()->Get(subgraph_idx); in TEST_F()
405 auto& subgraph = model_.subgraphs[0]; in QuantizeConvModel2Test()
427 const auto& subgraph = model_.subgraphs[0]; in TEST_P()
[all …]
/external/armnn/src/armnn/test/
DSubgraphViewTests.cpp751 SubgraphViewSelector::Subgraphs subgraphs = variable
754 CHECK(subgraphs.empty());
764 SubgraphViewSelector::Subgraphs subgraphs = variable
774 CHECK(subgraphs.size() == 1);
775 if (subgraphs.size() == 1)
782 CompareSubgraphViews(subgraphs[0], expected);
799 SubgraphViewSelector::Subgraphs subgraphs = variable
809 CHECK(subgraphs.size() == 1);
810 if (subgraphs.size() == 1)
816 CompareSubgraphViews(subgraphs[0], expected);
[all …]
/external/armnn/src/armnnTfLiteParser/test/
DLoadModel.cpp25 "subgraphs": [ in LoadModelFixture()
137 size_t subgraphs, const std::string desc, size_t buffers) in CheckModel()
143 CHECK_EQ(subgraphs, model->subgraphs.size()); in CheckModel()
191 CheckSubgraph(model->subgraphs[0], 2, { 1 }, { 0 }, 1, "");
192 CheckSubgraph(model->subgraphs[1], 3, { 0 }, { 1 }, 1, "");
193 …CheckOperator(model->subgraphs[0]->operators[0], 0, { 1 }, { 0 }, tflite::BuiltinOptions_Pool2DOpt…
195 …CheckOperator(model->subgraphs[1]->operators[0], 1, { 0, 2 }, { 1 }, tflite::BuiltinOptions_Conv2D…
211 CheckSubgraph(model->subgraphs[0], 2, { 1 }, { 0 }, 1, "");
212 CheckSubgraph(model->subgraphs[1], 3, { 0 }, { 1 }, 1, "");
213 …CheckOperator(model->subgraphs[0]->operators[0], 0, { 1 }, { 0 }, tflite::BuiltinOptions_Pool2DOpt…
[all …]
DInputOutputTensorNames.cpp18 "subgraphs": [ {} ] in EmptyNetworkFixture()
39 "subgraphs": [{ in MissingTensorsFixture()
61 "subgraphs": [{ in InvalidTensorsFixture()
95 "subgraphs": [{ in ValidTensorsFixture()
156 "subgraphs": [{ in Rank0TensorFixture()
/external/tensorflow/tensorflow/lite/toco/tflite/
Dimport_test.cc132 auto subgraphs = BuildSubGraphs(tensors, operators); in BuildTestModel() local
137 opcodes, subgraphs, s, buffers)); in BuildTestModel()
194 auto subgraphs = BuildSubGraphs(tensors, operators); in TEST_F() local
198 subgraphs, comment, buffers)); in TEST_F()
208 auto subgraphs = BuildSubGraphs(tensors, operators); in TEST_F() local
212 subgraphs, comment, buffers)); in TEST_F()
222 auto subgraphs = BuildSubGraphs(tensors, operators); in TEST_F() local
226 subgraphs, comment, buffers)); in TEST_F()
237 auto subgraphs = BuildSubGraphs(tensors, operators); in TEST_F() local
241 subgraphs, comment, buffers)); in TEST_F()
[all …]
/external/dagger2/java/dagger/internal/codegen/binding/
DLegacyBindingGraph.java36 private final ImmutableList<LegacyBindingGraph> subgraphs; field in LegacyBindingGraph
42 ImmutableList<LegacyBindingGraph> subgraphs) { in LegacyBindingGraph() argument
46 this.subgraphs = checkForDuplicates(subgraphs); in LegacyBindingGraph()
66 ImmutableList<LegacyBindingGraph> subgraphs() { in subgraphs() method in LegacyBindingGraph
67 return subgraphs; in subgraphs()
/external/tensorflow/tensorflow/lite/delegates/flex/
Ddelegate_data.cc113 const std::vector<std::unique_ptr<Subgraph>>& subgraphs, in GetSubgraphNamesForFunctionExecution() argument
116 for (const auto& subgraph : subgraphs) { in GetSubgraphNamesForFunctionExecution()
161 std::vector<std::unique_ptr<Subgraph>>* subgraphs = in RegisterFunctionDefForSubgraphs() local
163 if (!subgraphs) { in RegisterFunctionDefForSubgraphs()
170 select_subgraphs_to_register(*subgraphs, &function_subgraphs)); in RegisterFunctionDefForSubgraphs()
171 for (int i = 0; i < subgraphs->size(); ++i) { in RegisterFunctionDefForSubgraphs()
172 if (subgraphs->at(i)->GetName() == "main") { in RegisterFunctionDefForSubgraphs()
175 const std::string subgraph_name = subgraphs->at(i)->GetName(); in RegisterFunctionDefForSubgraphs()
182 new TFLiteSubgraphResource(*(subgraphs->at(i)), flex_delegate); in RegisterFunctionDefForSubgraphs()
186 BuildFunctionDefProto(subgraph_name, *(subgraphs->at(i)), fdef); in RegisterFunctionDefForSubgraphs()
/external/tensorflow/tensorflow/lite/tools/
Dlist_flex_ops_no_kernel.cc33 auto* subgraphs = model->subgraphs(); in AddFlexOpsFromModel() local
34 if (!subgraphs) return; in AddFlexOpsFromModel()
36 for (int subgraph_index = 0; subgraph_index < subgraphs->size(); in AddFlexOpsFromModel()
38 const tflite::SubGraph* subgraph = subgraphs->Get(subgraph_index); in AddFlexOpsFromModel()
Dflatbuffer_utils_test.py48 initial_subgraph = initial_model.subgraphs[0]
49 final_subgraph = final_model.subgraphs[0]
94 initial_subgraph = initial_model.subgraphs[0]
95 final_subgraph = final_model.subgraphs[0]
96 self.assertIsNotNone(initial_model.subgraphs[0].name)
97 self.assertIsNone(final_model.subgraphs[0].name)
139 initial_subgraph = initial_model.subgraphs[0]
140 final_subgraph = final_model.subgraphs[0]
180 initial_subgraph = initial_model.subgraphs[0]
181 final_subgraph = final_model.subgraphs[0]
Dlist_flex_ops.cc80 auto* subgraphs = model->subgraphs(); in AddFlexOpsFromModel() local
81 if (!subgraphs) return; in AddFlexOpsFromModel()
82 for (int subgraph_index = 0; subgraph_index < subgraphs->size(); in AddFlexOpsFromModel()
84 const tflite::SubGraph* subgraph = subgraphs->Get(subgraph_index); in AddFlexOpsFromModel()
/external/tensorflow/tensorflow/lite/python/analyzer_wrapper/
Dmodel_analyzer.cc77 const SubGraph* subgraph = model->subgraphs()->Get(subgraph_idx); in tensor_str()
217 auto* subgraphs = model->subgraphs(); in dump_model_summary() local
219 << "Your TFLite model has '" << subgraphs->Length() in dump_model_summary()
222 if (subgraphs->Length() > 0 && subgraphs->Get(0)->operators()->Length() > 0) { in dump_model_summary()
223 const Operator* first_op = subgraphs->Get(0)->operators()->Get(0); in dump_model_summary()
313 if (model->subgraphs()->Length() > 1) { in dump_model_stats()
314 for (int i = 0; i < model->subgraphs()->Length(); ++i) { in dump_model_stats()
386 auto* subgraphs = model->subgraphs(); in model_analyzer() local
388 stats.buffer_usage.resize(subgraphs->Length()); in model_analyzer()
393 for (int i = 0; i < subgraphs->Length(); ++i) { in model_analyzer()
[all …]
/external/tensorflow/tensorflow/lite/kernels/
Dif.cc71 auto* subgraphs = this_subgraph->GetSubgraphs(); in Prepare() local
72 TF_LITE_ENSURE(context, op_data->then_subgraph_index < subgraphs->size()); in Prepare()
73 TF_LITE_ENSURE(context, op_data->else_subgraph_index < subgraphs->size()); in Prepare()
75 Subgraph* then_subgraph = (*subgraphs)[op_data->then_subgraph_index].get(); in Prepare()
76 Subgraph* else_subgraph = (*subgraphs)[op_data->else_subgraph_index].get(); in Prepare()
148 auto* subgraphs = this_subgraph->GetSubgraphs(); in Eval() local
156 *(*subgraphs)[active_branch_subgraph_index]; in Eval()
221 Subgraph* then_subgraph = (*subgraphs)[op_data->then_subgraph_index].get(); in Eval()
222 Subgraph* else_subgraph = (*subgraphs)[op_data->else_subgraph_index].get(); in Eval()
Dcall_once.cc68 auto* subgraphs = this_subgraph->GetSubgraphs(); in Prepare() local
73 TF_LITE_ENSURE(context, op_data->init_subgraph_index < subgraphs->size()); in Prepare()
76 Subgraph* init_subgraph = (*subgraphs)[op_data->init_subgraph_index].get(); in Prepare()
94 auto* subgraphs = this_subgraph->GetSubgraphs(); in Eval() local
95 Subgraph& init_subgraph = *(*subgraphs)[op_data->init_subgraph_index]; in Eval()
Dwhile.cc230 auto* subgraphs = this_subgraph->GetSubgraphs(); in Prepare_impl() local
231 TF_LITE_ENSURE(context, op_data->cond_subgraph_index < subgraphs->size()); in Prepare_impl()
232 TF_LITE_ENSURE(context, op_data->body_subgraph_index < subgraphs->size()); in Prepare_impl()
236 Subgraph* cond_subgraph = (*subgraphs)[op_data->cond_subgraph_index].get(); in Prepare_impl()
237 Subgraph* body_subgraph = (*subgraphs)[op_data->body_subgraph_index].get(); in Prepare_impl()
378 auto* subgraphs = this_subgraph->GetSubgraphs(); in Eval_dynamic() local
379 Subgraph* cond_subgraph = (*subgraphs)[op_data->cond_subgraph_index].get(); in Eval_dynamic()
380 Subgraph* body_subgraph = (*subgraphs)[op_data->body_subgraph_index].get(); in Eval_dynamic()
489 auto* subgraphs = this_subgraph->GetSubgraphs(); in Eval_static() local
490 Subgraph* cond_subgraph = (*subgraphs)[op_data->cond_subgraph_index].get(); in Eval_static()
[all …]
/external/tensorflow/tensorflow/lite/experimental/acceleration/mini_benchmark/model_modifier/
Dvalidation_graph_builder.cc67 auto main_subgraph_name = main_model_->subgraphs()->Get(0)->name(); in BuildFinalModel()
81 auto subgraphs = SubGraphs(intermediate_only, &tensor_info); in MakeModel() local
82 if (!subgraphs.ok()) { in MakeModel()
83 return subgraphs.status(); in MakeModel()
90 return CreateModel(fbb_, kModelVersion, *operator_codes, *subgraphs, in MakeModel()
206 const SubGraph* main_subgraph = main_model_->subgraphs()->Get(0); in Tensors()
232 auto status = copy(main_model_->subgraphs()->Get(0), in Tensors()
233 main_model_->subgraphs()->Get(0)->inputs(), in Tensors()
241 auto status = copy(main_model_->subgraphs()->Get(0), in Tensors()
242 main_model_->subgraphs()->Get(0)->outputs(), in Tensors()
[all …]
/external/tensorflow/tensorflow/lite/tools/versioning/
Dgpu_compatibility_test.cc31 auto subgraphs = model->subgraphs(); in CheckGpuDelegateCompatibility() local
33 for (int i = 0; i < subgraphs->Length(); ++i) { in CheckGpuDelegateCompatibility()
34 const SubGraph* subgraph = subgraphs->Get(i); in CheckGpuDelegateCompatibility()
/external/tensorflow/tensorflow/lite/experimental/acceleration/mini_benchmark/
Dembedder.cc172 auto subgraphs = SubGraphs(intermediate_only, &tensor_info); in MakeModel() local
173 if (!subgraphs.ok()) { in MakeModel()
174 return subgraphs.status(); in MakeModel()
181 return CreateModel(fbb_, kModelVersion, *operator_codes, *subgraphs, in MakeModel()
294 const SubGraph* main_subgraph = main_model_->subgraphs()->Get(0); in Tensors()
320 auto status = copy(main_model_->subgraphs()->Get(0), in Tensors()
321 main_model_->subgraphs()->Get(0)->inputs(), in Tensors()
329 auto status = copy(main_model_->subgraphs()->Get(0), in Tensors()
330 main_model_->subgraphs()->Get(0)->outputs(), in Tensors()
340 status = copy(main_model_->subgraphs()->Get(0), in Tensors()
[all …]

12345678910