Home
last modified time | relevance | path

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

123456

/external/tensorflow/tensorflow/lite/tools/optimize/
Dquantization_wrapper_utils_custom_test.cc46 model->subgraphs.push_back(std::move(subgraph)); in TEST()
56 model->subgraphs[0]->tensors.push_back(std::move(tensor)); in TEST()
58 model->subgraphs[0]->operators.push_back(std::move(lstm_op)); in TEST()
68 EXPECT_EQ(model->subgraphs.size(), 1); in TEST()
69 EXPECT_EQ(model->subgraphs[0]->operators.size(), 1); in TEST()
70 EXPECT_EQ(model->subgraphs[0]->tensors.size(), 33); in TEST()
75 EXPECT_EQ(model->subgraphs[0]->tensors[0]->name, "lstm_tensor0"); in TEST()
76 EXPECT_EQ(model->subgraphs[0]->tensors[21]->name, "intermediate_0_0"); in TEST()
77 EXPECT_EQ(model->subgraphs[0]->tensors[22]->name, "intermediate_0_1"); in TEST()
78 EXPECT_EQ(model->subgraphs[0]->tensors[23]->name, "intermediate_0_2"); in TEST()
[all …]
Dmodify_model_interface_test.cc43 model->subgraphs.push_back(std::move(subgraph)); in CreateQuantizedModelSingleInputOutput()
74 model->subgraphs[0]->operators.push_back(std::move(quant_op)); in CreateQuantizedModelSingleInputOutput()
75 model->subgraphs[0]->operators.push_back(std::move(fc_op)); in CreateQuantizedModelSingleInputOutput()
76 model->subgraphs[0]->operators.push_back(std::move(dequant_op)); in CreateQuantizedModelSingleInputOutput()
83 model->subgraphs[0]->inputs = {0}; in CreateQuantizedModelSingleInputOutput()
84 model->subgraphs[0]->outputs = {3}; in CreateQuantizedModelSingleInputOutput()
113 model->subgraphs[0]->tensors.push_back(std::move(tensor_0)); in CreateQuantizedModelSingleInputOutput()
114 model->subgraphs[0]->tensors.push_back(std::move(tensor_1)); in CreateQuantizedModelSingleInputOutput()
115 model->subgraphs[0]->tensors.push_back(std::move(tensor_2)); in CreateQuantizedModelSingleInputOutput()
116 model->subgraphs[0]->tensors.push_back(std::move(tensor_3)); in CreateQuantizedModelSingleInputOutput()
[all …]
Dquantization_wrapper_utils_test.cc47 model->subgraphs.push_back(std::move(subgraph)); in TEST()
57 model->subgraphs[0]->tensors.push_back(std::move(tensor)); in TEST()
59 model->subgraphs[0]->operators.push_back(std::move(lstm_op)); in TEST()
69 EXPECT_EQ(model->subgraphs.size(), 1); in TEST()
70 EXPECT_EQ(model->subgraphs[0]->operators.size(), 1); in TEST()
71 EXPECT_EQ(model->subgraphs[0]->tensors.size(), 26); in TEST()
76 EXPECT_EQ(model->subgraphs[0]->tensors[0]->name, "lstm_tensor0"); in TEST()
77 EXPECT_EQ(model->subgraphs[0]->tensors[21]->name, "intermediate_0_0"); in TEST()
78 EXPECT_EQ(model->subgraphs[0]->tensors[22]->name, "intermediate_0_1"); in TEST()
79 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()
158 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in TEST_F()
160 const auto quantized_graph = output_model->subgraphs()->Get(subgraph_idx); in TEST_F()
161 const auto float_graph = model_->subgraphs()->Get(subgraph_idx); in TEST_F()
189 ASSERT_EQ(output_model->subgraphs()->size(), model_->subgraphs()->size()); in TEST_F()
190 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in TEST_F()
192 const auto quantized_graph = output_model->subgraphs()->Get(subgraph_idx); in TEST_F()
193 const auto float_graph = model_->subgraphs()->Get(subgraph_idx); in TEST_F()
[all …]
Dquantization_utils_test.cc469 ASSERT_TRUE(readonly_model->subgraphs()); in TEST_F()
470 ASSERT_GE(readonly_model->subgraphs()->size(), 1); in TEST_F()
473 auto subgraph = model.subgraphs[0].get(); in TEST_F()
519 ASSERT_TRUE(readonly_model->subgraphs()); in TEST_F()
520 ASSERT_GE(readonly_model->subgraphs()->size(), 1); in TEST_F()
523 auto subgraph = model.subgraphs[0].get(); in TEST_F()
554 ASSERT_TRUE(readonly_model->subgraphs()); in TEST_F()
555 ASSERT_GE(readonly_model->subgraphs()->size(), 1); in TEST_F()
558 auto subgraph = model.subgraphs[0].get(); in TEST_F()
594 model->subgraphs.push_back(std::move(subgraph)); in TEST_F()
[all …]
Dquantize_model_test.cc85 ASSERT_EQ(model.subgraphs.size(), expected_model.subgraphs.size()); in ExpectSameModels()
86 for (size_t subgraph_idx = 0; subgraph_idx < model.subgraphs.size(); in ExpectSameModels()
88 const auto graph = model.subgraphs[subgraph_idx].get(); in ExpectSameModels()
89 const auto expected_graph = expected_model.subgraphs[subgraph_idx].get(); in ExpectSameModels()
153 ASSERT_EQ(model_.subgraphs.size(), readonly_model_->subgraphs()->size()); in TEST_P()
155 ASSERT_EQ(model_.subgraphs.size(), readonly_model_->subgraphs()->size()); in TEST_P()
156 for (size_t subgraph_idx = 0; subgraph_idx < model_.subgraphs.size(); in TEST_P()
158 const auto quantized_graph = model_.subgraphs[subgraph_idx].get(); in TEST_P()
159 const auto float_graph = readonly_model_->subgraphs()->Get(subgraph_idx); in TEST_P()
178 ASSERT_EQ(model_.subgraphs.size(), readonly_model_->subgraphs()->size()); in TEST_P()
[all …]
Dquantization_wrapper_utils.cc48 for (int subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in IntermediateTensorExists()
50 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in IntermediateTensorExists()
78 if (model->subgraphs.size() == 1 && model->subgraphs[0]->operators.empty()) { in AddIntermediateTensorsToFusedOp()
86 for (int subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in AddIntermediateTensorsToFusedOp()
88 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in AddIntermediateTensorsToFusedOp()
Dmodify_model_interface.cc53 for (size_t subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in GetInputTensors()
55 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in GetInputTensors()
128 for (size_t subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in GetOutputTensors()
130 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in GetOutputTensors()
200 SubGraphT* subgraph = model->subgraphs.at(tot.subgraph_index).get(); in SetInputTypeToUINT8()
227 SubGraphT* subgraph = model->subgraphs.at(tot.subgraph_index).get(); in SetOutputTypeToUINT8()
260 SubGraphT* subgraph = model->subgraphs.at(tot.subgraph_index).get(); in RemoveInputTensor()
286 SubGraphT* subgraph = model->subgraphs.at(tot.subgraph_index).get(); in RemoveOutputTensor()
306 return model->subgraphs[0]->tensors.size() - outputs.size() - inputs.size(); in GetOriginalNumberOfTensors()
396 for (size_t subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in AddUint8Dequant()
[all …]
Dmodel_utils_test.cc50 model.subgraphs.push_back(std::move(subgraph)); in TEST()
53 EXPECT_FALSE(HasBuffer(&model, model.subgraphs[0].get(), 0)); in TEST()
55 EXPECT_TRUE(HasBuffer(&model, model.subgraphs[0].get(), 0)); in TEST()
Dquantize_model.cc60 const SubGraphT* subgraph = model->subgraphs[subgraph_index].get(); in GetOperatorProperty()
89 for (size_t subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in PopulateRealValueOpSet()
91 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in PopulateRealValueOpSet()
390 for (int subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in SetInputAndOutputTypes()
392 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in SetInputAndOutputTypes()
442 for (int subgraph_idx = 0; subgraph_idx < model->subgraphs.size(); in ApplyConstraints()
444 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in ApplyConstraints()
524 for (int subgraph_idx = 0, end = model->subgraphs.size(); subgraph_idx < end; in SetOperatorPropertyADDSUBOperator()
526 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in SetOperatorPropertyADDSUBOperator()
602 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in QuantizeOpInput()
[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/toco/tflite/
Dimport_test.cc129 auto subgraphs = BuildSubGraphs(tensors, operators); in BuildTestModel() local
134 opcodes, subgraphs, s, buffers)); in BuildTestModel()
191 auto subgraphs = BuildSubGraphs(tensors, operators); in TEST_F() local
195 subgraphs, comment, buffers)); in TEST_F()
205 auto subgraphs = BuildSubGraphs(tensors, operators); in TEST_F() local
209 subgraphs, comment, buffers)); in TEST_F()
219 auto subgraphs = BuildSubGraphs(tensors, operators); in TEST_F() local
223 subgraphs, comment, buffers)); in TEST_F()
234 auto subgraphs = BuildSubGraphs(tensors, operators); in TEST_F() local
238 subgraphs, comment, buffers)); in TEST_F()
[all …]
Dimport.cc34 auto tensors = (*input_model.subgraphs())[0]->tensors(); in LoadTensorsTable()
57 auto tensors = (*input_model.subgraphs())[0]->tensors(); in ImportTensors()
107 auto ops = (*input_model.subgraphs())[0]->operators(); in ImportOperators()
174 auto inputs = (*input_model.subgraphs())[0]->inputs(); in ImportIOTensors()
185 auto outputs = (*input_model.subgraphs())[0]->outputs(); in ImportIOTensors()
215 if (!input_model->subgraphs() || input_model->subgraphs()->size() != 1) { in Import()
/external/tensorflow/tensorflow/lite/tools/
Dlist_flex_ops_no_kernel.cc31 auto* subgraphs = model->subgraphs(); in AddFlexOpsFromModel() local
32 if (!subgraphs) return; in AddFlexOpsFromModel()
34 for (int subgraph_index = 0; subgraph_index < subgraphs->size(); in AddFlexOpsFromModel()
36 const tflite::SubGraph* subgraph = subgraphs->Get(subgraph_index); in AddFlexOpsFromModel()
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()
Dflatbuffer_utils_test.py50 initial_subgraph = initial_model.subgraphs[0]
51 final_subgraph = final_model.subgraphs[0]
96 initial_subgraph = initial_model.subgraphs[0]
97 final_subgraph = final_model.subgraphs[0]
98 self.assertIsNotNone(initial_model.subgraphs[0].name)
99 self.assertIsNone(final_model.subgraphs[0].name)
141 initial_subgraph = initial_model.subgraphs[0]
142 final_subgraph = final_model.subgraphs[0]
/external/tensorflow/tensorflow/lite/kernels/
Dcall_once.cc69 auto* subgraphs = this_subgraph->GetSubgraphs(); in Prepare() local
70 TF_LITE_ENSURE(context, op_data->init_subgraph_index < subgraphs->size()); in Prepare()
73 Subgraph* init_subgraph = (*subgraphs)[op_data->init_subgraph_index].get(); in Prepare()
86 auto* subgraphs = this_subgraph->GetSubgraphs(); in Eval() local
87 Subgraph& init_subgraph = *(*subgraphs)[op_data->init_subgraph_index]; in Eval()
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()
145 auto* subgraphs = this_subgraph->GetSubgraphs(); in Eval() local
153 *(*subgraphs)[active_branch_subgraph_index]; in Eval()
Dwhile.cc138 auto* subgraphs = this_subgraph->GetSubgraphs(); in Prepare() local
139 TF_LITE_ENSURE(context, op_data->cond_subgraph_index < subgraphs->size()); in Prepare()
140 TF_LITE_ENSURE(context, op_data->body_subgraph_index < subgraphs->size()); in Prepare()
142 Subgraph* cond_subgraph = (*subgraphs)[op_data->cond_subgraph_index].get(); in Prepare()
143 Subgraph* body_subgraph = (*subgraphs)[op_data->body_subgraph_index].get(); in Prepare()
217 auto* subgraphs = this_subgraph->GetSubgraphs(); in Eval() local
218 Subgraph* cond_subgraph = (*subgraphs)[op_data->cond_subgraph_index].get(); in Eval()
219 Subgraph* body_subgraph = (*subgraphs)[op_data->body_subgraph_index].get(); in Eval()
/external/tensorflow/tensorflow/core/common_runtime/
Dpartitioning_utils_test.cc122 std::unordered_map<string, std::unique_ptr<Graph>> subgraphs; in TEST_F() local
124 PartitionFunctionGraph(device_set_, std::move(graph), &subgraphs); in TEST_F()
133 std::unordered_map<string, std::unique_ptr<Graph>> subgraphs; in TEST_F() local
135 PartitionFunctionGraph(device_set_, std::move(graph), &subgraphs); in TEST_F()
138 ASSERT_EQ(1, subgraphs.size()); in TEST_F()
139 const auto& pair = *subgraphs.begin(); in TEST_F()
148 std::unordered_map<string, std::unique_ptr<Graph>> subgraphs; in TEST_F() local
150 PartitionFunctionGraph(device_set_, std::move(graph), &subgraphs); in TEST_F()
153 ASSERT_EQ(2, subgraphs.size()); in TEST_F()
155 const auto& part1 = subgraphs["/job:a/replica:0/task:0/device:CPU:0"]; in TEST_F()
[all …]
/external/tensorflow/tensorflow/lite/python/
Dutil.py586 model_object.subgraphs[0].inputs[0] = model_object.subgraphs[0].inputs[0]
603 if len(model.subgraphs) > 1:
605 "{} subgraphs.".format(len(model.subgraphs)))
606 subgraph = model.subgraphs[0]
648 subgraph = model.subgraphs[0]
741 subgraph = model.subgraphs[0]
875 if len(model_object.subgraphs) > 1:
877 "{} subgraphs.".format(len(model_object.subgraphs)))
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/
Dcalibration_reader.cc38 if (!model || model->subgraphs.empty()) { in AddCalibrationToModel()
41 const auto& subgraph = model->subgraphs[0]; in AddCalibrationToModel()
Dcalibrator.cc336 auto subgraphs = tflite_model->subgraphs(); in BuildLoggingInterpreter() local
339 if (subgraphs->size() != 1) { in BuildLoggingInterpreter()
343 subgraphs->size()); in BuildLoggingInterpreter()
352 auto primary_subgraph = subgraphs->Get(0); in BuildLoggingInterpreter()
/external/tensorflow/tensorflow/lite/tools/versioning/
Druntime_version.cc362 auto subgraphs = model->subgraphs(); in UpdateMinimumRuntimeVersionForModel() local
363 for (int i = 0; i < subgraphs->Length(); ++i) { in UpdateMinimumRuntimeVersionForModel()
364 const SubGraph* subgraph = subgraphs->Get(i); in UpdateMinimumRuntimeVersionForModel()
/external/tensorflow/tensorflow/lite/micro/
Dtest_helpers.cc211 const flatbuffers::Offset<SubGraph> subgraphs[subgraphs_size] = { in BuildModel() local
224 builder_->CreateVector(subgraphs, subgraphs_size), in BuildModel()
233 builder_->CreateVector(subgraphs, subgraphs_size), in BuildModel()
399 const Offset<SubGraph> subgraphs[subgraphs_size] = { in BuildSimpleMockModel() local
412 builder->CreateVector(subgraphs, subgraphs_size), in BuildSimpleMockModel()
548 const Offset<SubGraph> subgraphs[subgraphs_size] = { in BuildComplexMockModel() local
563 builder->CreateVector(subgraphs, subgraphs_size), in BuildComplexMockModel()
619 const Offset<SubGraph> subgraphs[subgraphs_size] = { in BuildSimpleMultipleInputsModel() local
632 builder->CreateVector(subgraphs, subgraphs_size), in BuildSimpleMultipleInputsModel()
1071 auto* subgraphs = model->subgraphs(); in GetModelTensorCount() local
[all …]

123456