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

Function ImportQuint8Array

tensorflow/lite/toco/import_tensorflow.cc:399–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399tensorflow::Status ImportQuint8Array(const TensorProto& input_tensor,
400 Array* output_array) {
401 CHECK_EQ(input_tensor.dtype(), DT_QUINT8);
402 const auto& input_shape = input_tensor.tensor_shape();
403 CHECK_LE(input_shape.dim_size(), 6);
404 int input_flat_size;
405 auto status = ImportShape(input_shape.dim(), &input_flat_size,
406 output_array->mutable_shape());
407 if (!status.ok()) return status;
408
409 auto& output_int_data =
410 output_array->GetMutableBuffer<ArrayDataType::kUint8>().data;
411 output_int_data.resize(RequiredBufferSizeForShape(output_array->shape()), 0);
412 return ImportTensorData<uint8_t>(input_tensor, input_flat_size,
413 &output_int_data);
414}
415
416tensorflow::Status ImportInt32Array(const TensorProto& input_tensor,
417 Array* output_array) {

Callers 1

ConvertConstOperatorFunction · 0.85

Calls 9

ImportShapeFunction · 0.85
dtypeMethod · 0.45
dim_sizeMethod · 0.45
dimMethod · 0.45
mutable_shapeMethod · 0.45
okMethod · 0.45
resizeMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected