Searched refs:tflite_tensor (Results 1 – 7 of 7) sorted by relevance
/external/tensorflow/tensorflow/lite/delegates/gpu/common/ |
D | model_builder_test.cc | 39 TfLiteTensor tflite_tensor; in TEST() local 40 tflite_tensor.name = "tensor_name"; in TEST() 41 tflite_tensor.type = TfLiteType::kTfLiteFloat32; in TEST() 42 tflite_tensor.dims = TfLiteIntArrayCreate(1); in TEST() 43 tflite_tensor.dims->data[0] = 4; in TEST() 46 ConvertTfLiteTensorToTensorRef(tflite_tensor, &tensor_ref); in TEST() 47 TfLiteIntArrayFree(tflite_tensor.dims); in TEST() 54 TfLiteTensor tflite_tensor; in TEST() local 55 tflite_tensor.name = "tensor_name"; in TEST() 56 tflite_tensor.type = TfLiteType::kTfLiteInt32; in TEST() [all …]
|
D | object_reader.cc | 45 TfLiteTensor* tflite_tensor = &context->tensors[tensor_idx]; in ReadNonConstantTensor() local 46 if (tflite::IsConstantTensor(tflite_tensor)) { in ReadNonConstantTensor() 51 if ((tflite_tensor->type == kTfLiteInt8 || in ReadNonConstantTensor() 52 tflite_tensor->type == kTfLiteUInt8) && in ReadNonConstantTensor() 68 tflite_tensor = &context->tensors[tensor_idx]; in ReadNonConstantTensor() 78 value->tensor.is_variable_input = tflite_tensor->is_variable; in ReadNonConstantTensor() 81 PopulateQuantParams(*tflite_tensor, &value->quant_params.value())); in ReadNonConstantTensor() 91 ConvertTfLiteTensorToTensorRef(*tflite_tensor, &value->tensor)); in ReadNonConstantTensor() 93 value->tensor.is_variable_input = tflite_tensor->is_variable; in ReadNonConstantTensor() 133 const TfLiteTensor& tflite_tensor = context_->tensors[tensor_idx]; in GetTensorDims() local [all …]
|
D | object_reader.h | 73 const TfLiteTensor* tflite_tensor = context_->tensors + tensor_idx; in ReadTensor() local 74 if (tflite_tensor->sparsity != nullptr) { in ReadTensor() 77 t->data.resize(NumElements(tflite_tensor)); in ReadTensor() 78 RETURN_IF_ERROR(CreateVectorCopyData(*tflite_tensor, &t->data[0])); in ReadTensor() 83 return SetAllDimensions(tflite_tensor->dims, &t->shape); in ReadTensor()
|
D | model_builder_helper.cc | 96 absl::Status ExtractTensorShape(const TfLiteTensor& tflite_tensor, BHWC* bhwc) { in ExtractTensorShape() argument 97 const TfLiteIntArray* dims = tflite_tensor.dims; in ExtractTensorShape() 117 "Tensor \"", tflite_tensor.name ? tflite_tensor.name : "nullptr", in ExtractTensorShape() 122 absl::Status ExtractAxisFromIndex(const TfLiteTensor& tflite_tensor, int index, in ExtractAxisFromIndex() argument 124 const TfLiteIntArray* dims = tflite_tensor.dims; in ExtractAxisFromIndex() 156 absl::Status ConvertTfLiteTensorToTensorRef(const TfLiteTensor& tflite_tensor, in ConvertTfLiteTensorToTensorRef() argument 158 tensor_ref->type = ToDataType(tflite_tensor.type); in ConvertTfLiteTensorToTensorRef() 159 return ExtractTensorShape(tflite_tensor, &tensor_ref->shape); in ConvertTfLiteTensorToTensorRef()
|
D | model_builder_helper.h | 46 absl::Status ExtractTensorShape(const TfLiteTensor& tflite_tensor, BHWC* bhwc); 48 absl::Status ExtractAxisFromIndex(const TfLiteTensor& tflite_tensor, int index, 51 absl::Status ConvertTfLiteTensorToTensorRef(const TfLiteTensor& tflite_tensor,
|
D | model_builder.h | 67 absl::Status ConvertTfLiteTensorToTensorRef(const TfLiteTensor& tflite_tensor,
|
D | model_builder.cc | 2549 const TfLiteTensor& tflite_tensor = context->tensors[tensor_index]; in PrecreateIOTensors() local 2550 if (tflite::IsConstantTensor(&tflite_tensor)) continue; in PrecreateIOTensors()
|