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

Function ImportInt32Array

tensorflow/lite/toco/import_tensorflow.cc:416–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416tensorflow::Status ImportInt32Array(const TensorProto& input_tensor,
417 Array* output_array) {
418 CHECK_EQ(input_tensor.dtype(), DT_INT32);
419 const auto& input_shape = input_tensor.tensor_shape();
420 CHECK_LE(input_shape.dim_size(), 6);
421 int input_flat_size;
422 auto status = ImportShape(input_shape.dim(), &input_flat_size,
423 output_array->mutable_shape());
424 if (!status.ok()) return status;
425
426 auto& output_int_data =
427 output_array->GetMutableBuffer<ArrayDataType::kInt32>().data;
428 output_int_data.resize(RequiredBufferSizeForShape(output_array->shape()), 0);
429 return ImportTensorData<int32>(input_tensor, input_flat_size,
430 &output_int_data);
431}
432
433tensorflow::Status ImportInt64Array(const TensorProto& input_tensor,
434 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