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

Function FixEdgeArrays

tensorflow/lite/toco/tooling_util.cc:1282–1294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1280}
1281
1282void FixEdgeArrays(Model* model) {
1283 for (const string& output_array_name : model->flags.output_arrays()) {
1284 if (!GetOpWithOutput(*model, output_array_name)) {
1285 // Output has no operator producing it. Change that by inserting a copy.
1286 LOG(WARNING) << "Fixing constant output array " << output_array_name
1287 << " by inserting a copy. This is not optimal.";
1288 string intermediate_array_name =
1289 AvailableArrayName(*model, output_array_name + "_copy");
1290 CloneArray(model, output_array_name, intermediate_array_name);
1291 InsertCopyOperator(model, intermediate_array_name, output_array_name);
1292 }
1293 }
1294}
1295
1296void DedupeConstantArrays(Model* model, size_t min_size) {
1297 // Walk all 0..N and compare with the remaining n+1..N.

Callers 1

TransformWithStatusFunction · 0.85

Calls 4

GetOpWithOutputFunction · 0.85
AvailableArrayNameFunction · 0.85
CloneArrayFunction · 0.85
InsertCopyOperatorFunction · 0.85

Tested by

no test coverage detected