MCPcopy Create free account
hub / github.com/alibaba/MNN / getInput

Method getInput

source/core/Session.cpp:410–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410Tensor* Session::getInput(const char* name) const {
411 // MNN_ASSERT(!mInputs.empty());
412 if (nullptr == name) {
413 return mInfo.inputTensors.begin()->second;
414 }
415 auto iter = mInfo.inputTensors.find(name);
416 if (iter == mInfo.inputTensors.end()) {
417 MNN_PRINT("Error: can't find input: %s\n", name);
418 return nullptr;
419 }
420 return iter->second;
421}
422Tensor* Session::getTensor(int index) const {
423 return mInfo.allTensors[index].get();
424}

Callers 8

_loadStateMethod · 0.45
resizeMethod · 0.45
computeMethod · 0.45
getSessionInputMethod · 0.45
inputMethod · 0.45
inputMethod · 0.45

Calls 3

beginMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by 2

inputMethod · 0.36
inputMethod · 0.36