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

Function CopyArrayAttribs

tensorflow/lite/toco/tooling_util.cc:1355–1374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1353
1354namespace {
1355void CopyArrayAttribs(const Array& source_array, Array* target_array) {
1356 target_array->data_type = source_array.data_type;
1357 target_array->final_data_type = source_array.final_data_type;
1358 if (source_array.has_shape()) {
1359 target_array->copy_shape(source_array.shape());
1360 }
1361
1362 if (source_array.minmax) {
1363 target_array->GetOrCreateMinMax() = source_array.GetMinMax();
1364 } else {
1365 target_array->minmax.reset();
1366 }
1367
1368 if (source_array.quantization_params) {
1369 target_array->GetOrCreateQuantizationParams() =
1370 source_array.GetQuantizationParams();
1371 } else {
1372 target_array->quantization_params.reset();
1373 }
1374}
1375} // namespace
1376
1377void InsertCopyOperator(Model* model, const string& source_array_name,

Callers 2

InsertCopyOperatorFunction · 0.85
CloneArrayFunction · 0.85

Calls 4

has_shapeMethod · 0.80
copy_shapeMethod · 0.80
shapeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected