Home
last modified time | relevance | path

Searched refs:tensor_idx (Results 1 – 25 of 27) sorted by relevance

12

/external/tensorflow/tensorflow/lite/delegates/gpu/common/
Dobject_reader.cc38 uint32_t tensor_idx, Value** value) { in ReadNonConstantTensor() argument
39 if (tensor_idx >= context->tensors_size) { in ReadNonConstantTensor()
41 absl::StrCat("ReadNonConstTensor: input tensor index: ", tensor_idx)); in ReadNonConstantTensor()
44 if (tensor_to_value->find(tensor_idx) == tensor_to_value->end()) { in ReadNonConstantTensor()
45 TfLiteTensor* tflite_tensor = &context->tensors[tensor_idx]; in ReadNonConstantTensor()
48 "ReadNonConstantTensor: value is a constant tensor: ", tensor_idx)); in ReadNonConstantTensor()
55 if (quant_conversion_map->find(tensor_idx) == in ReadNonConstantTensor()
62 context, tensor_idx, kTfLiteFloat32, &fp_tflite_tensor, in ReadNonConstantTensor()
68 tflite_tensor = &context->tensors[tensor_idx]; in ReadNonConstantTensor()
71 (*quant_conversion_map)[fp_tensor_index] = tensor_idx; in ReadNonConstantTensor()
[all …]
Dobject_reader.h42 uint32_t tensor_idx, Value** value = nullptr);
56 absl::Status ReadValueByTensorIdx(uint32_t tensor_idx, Value** value);
Dmodel_builder.cc2916 int tensor_idx = tensor_indices->data[i]; in IsAllAllowedTensors() local
2917 if (tensor_idx == kTfLiteOptionalTensor) continue; in IsAllAllowedTensors()
2918 const TfLiteTensor* t = &context->tensors[tensor_idx]; in IsAllAllowedTensors()
3248 int tensor_idx = tflite_node->inputs->data[i]; in CopyVariableTensorOutputs() local
3250 if (!reader.ReadValueByTensorIdx(tensor_idx, &value).ok()) continue; in CopyVariableTensorOutputs()
3258 tensor_idx)); in CopyVariableTensorOutputs()
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/
Dcalibrator_test.cc107 for (int tensor_idx = 0; tensor_idx < 4; tensor_idx++) { in TEST() local
108 EXPECT_NEAR(stats.find({0, tensor_idx})->second.min, tensor_idx + 1, eps); in TEST()
109 EXPECT_NEAR(stats.find({0, tensor_idx})->second.max, tensor_idx + 1, eps); in TEST()
167 for (int tensor_idx = 0; tensor_idx < 7; tensor_idx++) { in TEST() local
168 EXPECT_NEAR(stats.find({0, tensor_idx})->second.min, in TEST()
169 expected_values[tensor_idx], eps); in TEST()
170 EXPECT_NEAR(stats.find({0, tensor_idx})->second.max, in TEST()
171 expected_values[tensor_idx], eps); in TEST()
186 for (int tensor_idx = 1; tensor_idx < 5; tensor_idx++) { in TEST() local
187 EXPECT_NEAR(stats.find({0, tensor_idx})->second.min, in TEST()
[all …]
/external/tensorflow/tensorflow/lite/tools/optimize/
Dquantize_weights_portable.cc60 int32_t tensor_idx) { in GetTensorConsumers() argument
70 if (op->inputs[i] == tensor_idx) { in GetTensorConsumers()
178 int32_t tensor_idx = op->inputs[op_input_idx]; in CheckAllOpInputsQuantized() local
180 if (tensor_idx == -1) { in CheckAllOpInputsQuantized()
185 TensorT* tensor = subgraph->tensors[tensor_idx].get(); in CheckAllOpInputsQuantized()
208 int32_t tensor_idx = op->inputs[op_input_idx]; in InsertQuantizableInputTensorsFromOperator() local
209 if (tensor_idx == -1) { in InsertQuantizableInputTensorsFromOperator()
215 TensorT* tensor = subgraph->tensors[tensor_idx].get(); in InsertQuantizableInputTensorsFromOperator()
240 tensor_map->insert({tensor_idx, in InsertQuantizableInputTensorsFromOperator()
244 tensor_map->insert({tensor_idx, in InsertQuantizableInputTensorsFromOperator()
[all …]
Dquantize_weights.cc74 int32_t tensor_idx) { in GetTensorConsumers() argument
84 if (op->inputs[i] == tensor_idx) { in GetTensorConsumers()
192 int32_t tensor_idx = op->inputs[op_input_idx]; in CheckAllOpInputsQuantized() local
194 if (tensor_idx == -1) { in CheckAllOpInputsQuantized()
199 TensorT* tensor = subgraph->tensors[tensor_idx].get(); in CheckAllOpInputsQuantized()
222 int32_t tensor_idx = op->inputs[op_input_idx]; in InsertQuantizableInputTensorsFromOperator() local
223 if (tensor_idx == -1) { in InsertQuantizableInputTensorsFromOperator()
229 TensorT* tensor = subgraph->tensors[tensor_idx].get(); in InsertQuantizableInputTensorsFromOperator()
254 tensor_map->insert({tensor_idx, in InsertQuantizableInputTensorsFromOperator()
258 tensor_map->insert({tensor_idx, in InsertQuantizableInputTensorsFromOperator()
[all …]
Dquantize_model.cc134 bool IsFloatTensor(const SubGraphT* subgraph, int32_t tensor_idx) { in IsFloatTensor() argument
135 TensorT* tensor = subgraph->tensors[tensor_idx].get(); in IsFloatTensor()
241 const int32_t tensor_idx = op->inputs[input_idx]; in PopulateRealValueOpSet() local
242 if (IsFloatTensor(subgraph, tensor_idx)) { in PopulateRealValueOpSet()
250 const int32_t tensor_idx = op->outputs[output_idx]; in PopulateRealValueOpSet() local
251 if (IsFloatTensor(subgraph, tensor_idx)) { in PopulateRealValueOpSet()
258 const int32_t tensor_idx = op->inputs[0]; in PopulateRealValueOpSet() local
259 if (IsFloatTensor(subgraph, tensor_idx)) { in PopulateRealValueOpSet()
265 const int32_t tensor_idx = op->outputs[0]; in PopulateRealValueOpSet() local
266 if (IsFloatTensor(subgraph, tensor_idx)) { in PopulateRealValueOpSet()
[all …]
Dmodify_model_interface.cc405 const int32_t tensor_idx = subgraph->inputs[input_idx]; in AddUint8Dequant() local
406 TensorT* tensor = subgraph->tensors[tensor_idx].get(); in AddUint8Dequant()
426 tensor_idx); in AddUint8Dequant()
445 const int32_t tensor_idx = subgraph->outputs[output_idx]; in AddUint8Quant() local
446 TensorT* tensor = subgraph->tensors[tensor_idx].get(); in AddUint8Quant()
465 utils::MakeQuantizeOperator(model, &tailing_op, tensor_idx, in AddUint8Quant()
Dquantize_weights_test.cc97 bool IsModelInputOrOutput(const Model* model, uint32_t tensor_idx) { in IsModelInputOrOutput() argument
102 if (subgraph->inputs()->Get(i) == tensor_idx) { in IsModelInputOrOutput()
107 if (subgraph->outputs()->Get(i) == tensor_idx) { in IsModelInputOrOutput()
117 uint32_t tensor_idx, in GetProducerOpCode() argument
123 if (op->outputs()->Get(i) == tensor_idx) { in GetProducerOpCode()
Dquantize_model_test.cc314 for (int tensor_idx = 0; tensor_idx < subgraph->tensors.size(); in TEST_P() local
315 ++tensor_idx) { in TEST_P()
316 const auto& tensor = subgraph->tensors[tensor_idx]; in TEST_P()
317 if (input_idx != tensor_idx && output_idx != tensor_idx) { in TEST_P()
392 for (int tensor_idx = 0; tensor_idx < subgraph->tensors.size(); in TEST_P() local
393 ++tensor_idx) { in TEST_P()
394 const auto& tensor = subgraph->tensors[tensor_idx]; in TEST_P()
395 if (input_idx != tensor_idx && output_idx != tensor_idx) { in TEST_P()
/external/tensorflow/tensorflow/lite/python/analyzer_wrapper/
Dmodel_analyzer.cc69 const std::string tensor_str(const int tensor_idx, const int subgraph_idx, in tensor_str() argument
72 if (subgraph_idx != 0 && tensor_idx != -1) in tensor_str()
73 ss << "T#" << subgraph_idx << "_" << tensor_idx; in tensor_str()
75 ss << "T#" << tensor_idx; in tensor_str()
76 if (model && tensor_idx != -1) { in tensor_str()
79 auto tensor = subgraph->tensors()->Get(tensor_idx); in tensor_str()
102 const tflite::Tensor* tensor, const int tensor_idx, in dump_tensor_detail() argument
105 out_stream << tensor_str(tensor_idx, subgraph_idx); in dump_tensor_detail()
157 const int tensor_idx = tensors->Get(i); in dump_tensor_list() local
159 out_stream << "tensor #" << tensor_idx; in dump_tensor_list()
[all …]
/external/tflite-support/tensorflow_lite_support/custom_ops/
Dtflite_inference_main.cc62 for (int tensor_idx : interpreter->inputs()) { in RunWithRandomInputs() local
63 auto tensor = interpreter->tensor(tensor_idx); in RunWithRandomInputs()
87 for (int tensor_idx : interpreter->outputs()) { in RunWithRandomInputs() local
88 auto tensor = interpreter->tensor(tensor_idx); in RunWithRandomInputs()
/external/tensorflow/tensorflow/lite/testing/
Dselective_build_test.cc48 for (int tensor_idx : interpreter->inputs()) { in RunWithRandomInputs() local
49 auto tensor = interpreter->tensor(tensor_idx); in RunWithRandomInputs()
/external/tensorflow/tensorflow/lite/java/src/main/native/
Dnativesignaturerunner_jni.cc65 for (int tensor_idx : signature_runner_->subgraph_->inputs()) { in GetInputIndex() local
66 if (input_tensor_index == tensor_idx) return count; in GetInputIndex()
78 for (int tensor_idx : signature_runner_->subgraph_->outputs()) { in GetOutputIndex() local
79 if (output_tensor_index == tensor_idx) return count; in GetOutputIndex()
Dnativeinterpreterwrapper_jni.cc566 const int tensor_idx = interpreter->inputs()[input_idx]; in Java_org_tensorflow_lite_NativeInterpreterWrapper_resizeInput() local
568 TfLiteTensor* target = interpreter->tensor(tensor_idx); in Java_org_tensorflow_lite_NativeInterpreterWrapper_resizeInput()
574 tensor_idx, ConvertJIntArrayToVector(env, dims)); in Java_org_tensorflow_lite_NativeInterpreterWrapper_resizeInput()
577 tensor_idx, ConvertJIntArrayToVector(env, dims)); in Java_org_tensorflow_lite_NativeInterpreterWrapper_resizeInput()
/external/tensorflow/tensorflow/core/kernels/
Dsparse_conditional_accumulator.h75 const Tensor* tensor_idx = std::get<0>(*tensor); in ValidateShape() local
100 tensor_idx->dims() > 0) { in ValidateShape()
101 for (int64_t i = 0; i < tensor_idx->dim_size(0); i++) { in ValidateShape()
102 if (tensor_idx->vec<int64_t>()(i) >= shape_.dim_size(0)) { in ValidateShape()
105 "; index is ", tensor_idx->vec<int64_t>()(i), " exceeded ", in ValidateShape()
Ddepthwise_conv_op_gpu.h252 const int tensor_idx = thread_pix * in_depth + thread_depth;
276 const int filter_offset = tensor_idx + start_channel;
542 const int tensor_idx = thread_depth * in_pixels + thread_pix;
568 const int inout_offset = channel * in_pixels + tensor_idx;
1224 const int tensor_idx = thread_pix * in_depth + thread_depth;
1247 const int filter_offset = tensor_idx + start_channel;
1458 const int tensor_idx = thread_depth * in_pixels + thread_pix;
1478 const int inout_offset = channel * in_pixels + tensor_idx;
/external/tensorflow/tensorflow/python/tpu/
Dtensor_tracer_report.py152 tensor_idx = self.graph_order.tensor_to_idx[tensor_name]
155 self.cache_idx_to_tensor_idx.append(tensor_idx)
421 tensor_idx = tensor_trace_order.cache_idx_to_tensor_idx[cache_idx]
422 line = '%d %d\n'%(cache_idx, tensor_idx)
/external/tensorflow/tensorflow/lite/tools/optimize/debugging/python/
Ddebugger.py217 {tensor_idx: op_info['index'] for tensor_idx in op_info['outputs']})
514 tensor_name, tensor_idx = numeric_verify_name.rsplit(':', 1)
519 return (float_tensor_name, int(tensor_idx))
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/lite/
Dquantize_weights_test.cc107 bool IsModelInputOrOutput(const Model* model, uint32_t tensor_idx) { in IsModelInputOrOutput() argument
112 if (subgraph->inputs()->Get(i) == tensor_idx) { in IsModelInputOrOutput()
117 if (subgraph->outputs()->Get(i) == tensor_idx) { in IsModelInputOrOutput()
127 uint32_t tensor_idx, BuiltinOperator* op_code) { in GetProducerOpCode() argument
132 if (op->outputs()->Get(i) == tensor_idx) { in GetProducerOpCode()
/external/ComputeLibrary/tests/validation/fixtures/
DGEMMFixture.h1179 int tensor_idx = 0; in compute_reference() local
1180 fill(lhs, tensor_idx++); in compute_reference()
1181 fill(rhs, tensor_idx++); in compute_reference()
1182 fill(bias, tensor_idx++); in compute_reference()
1187 fill(*tensor, tensor_idx++); in compute_reference()
1769 int tensor_idx = 0; in compute_reference() local
1770 fill(lhs, tensor_idx++); in compute_reference()
1771 fill(rhs, tensor_idx++); in compute_reference()
1772 fill(bias, tensor_idx++); in compute_reference()
1777 fill(*tensor, tensor_idx++); in compute_reference()
[all …]
/external/tensorflow/tensorflow/lite/c/
Dcommon.h824 int tensor_idx);
830 int tensor_idx);
/external/tensorflow/tensorflow/lite/tools/
Dverifier.cc517 for (const int tensor_idx : *subgraph.inputs()) { in VerifySubGraphConsistency()
518 subgraph_input_tensors.insert(tensor_idx); in VerifySubGraphConsistency()
/external/tensorflow/tensorflow/lite/python/
Dconvert.py932 for tensor_idx in read_only_input_tensor_indices:
933 read_only_buffer_indices.add(subgraph.tensors[tensor_idx].buffer)
/external/tensorflow/tensorflow/lite/core/
Dsubgraph.cc177 const int tensor_idx) { in VerifyCustomAllocationForTensor() argument
178 auto& tensor = context->tensors[tensor_idx]; in VerifyCustomAllocationForTensor()
180 const auto idx_and_alloc = tensor_idx_to_alloc.find(tensor_idx); in VerifyCustomAllocationForTensor()
185 tensor_idx); in VerifyCustomAllocationForTensor()

12