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

Function ImportComplex64Array

tensorflow/lite/toco/import_tensorflow.cc:381–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381tensorflow::Status ImportComplex64Array(const TensorProto& input_tensor,
382 Array* output_array) {
383 CHECK_EQ(input_tensor.dtype(), DT_COMPLEX64);
384 const auto& input_shape = input_tensor.tensor_shape();
385 CHECK_LE(input_shape.dim_size(), 4);
386 int input_flat_size;
387 auto status = ImportShape(input_shape.dim(), &input_flat_size,
388 output_array->mutable_shape());
389 if (!status.ok()) return status;
390
391 auto& output_complex_data =
392 output_array->GetMutableBuffer<ArrayDataType::kComplex64>().data;
393 output_complex_data.resize(RequiredBufferSizeForShape(output_array->shape()),
394 std::complex<float>(0.f, 0.f));
395 return ImportTensorData<std::complex<float>>(input_tensor, input_flat_size,
396 &output_complex_data);
397}
398
399tensorflow::Status ImportQuint8Array(const TensorProto& input_tensor,
400 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