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

Function ImportFloatArray

tensorflow/lite/toco/import_tensorflow.cc:363–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363tensorflow::Status ImportFloatArray(const TensorProto& input_tensor,
364 Array* output_array) {
365 CHECK_EQ(input_tensor.dtype(), DT_FLOAT);
366 const auto& input_shape = input_tensor.tensor_shape();
367 CHECK_LE(input_shape.dim_size(), 6);
368 int input_flat_size;
369 auto status = ImportShape(input_shape.dim(), &input_flat_size,
370 output_array->mutable_shape());
371 if (!status.ok()) return status;
372
373 auto& output_float_data =
374 output_array->GetMutableBuffer<ArrayDataType::kFloat>().data;
375 output_float_data.resize(RequiredBufferSizeForShape(output_array->shape()),
376 0.f);
377 return ImportTensorData<float>(input_tensor, input_flat_size,
378 &output_float_data);
379}
380
381tensorflow::Status ImportComplex64Array(const TensorProto& input_tensor,
382 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