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

Function FindOpWithInput

tensorflow/lite/toco/tooling_util.cc:231–241  ·  view source on GitHub ↗

GetFirstOpWithInput assumes that this finds the first op.

Source from the content-addressed store, hash-verified

229
230// GetFirstOpWithInput assumes that this finds the first op.
231std::vector<std::unique_ptr<Operator>>::const_iterator FindOpWithInput(
232 const Model& model, const string& array_name) {
233 for (auto it = model.operators.begin(); it != model.operators.end(); ++it) {
234 for (auto& input : it->get()->inputs) {
235 if (input == array_name) {
236 return it;
237 }
238 }
239 }
240 return model.operators.end();
241}
242
243std::vector<std::unique_ptr<Operator>>::iterator FindOpWithInput(
244 Model& model, const string& array_name) {

Calls 3

beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected