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

Method getTensor

express/Expr.cpp:618–625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

616 return mFrom->outputName(mFromIndex);
617}
618const Tensor* Variable::getTensor() const {
619 auto inside = mFrom->inside();
620 auto inputTensor = inside->mOutputTensors[mFromIndex];
621 if (nullptr != inside->mCache) {
622 inputTensor = inside->mCache->getSession()->getTensor(inside->mCacheOffset + mFromIndex);
623 }
624 return inputTensor;
625}
626bool Variable::input(VARP src) {
627 if (nullptr != mFrom->get()) {
628 MNN_ERROR("Can't input to no-input op\n");

Callers 15

CalibrationMethod · 0.45
_computeQuantErrorMethod · 0.45
_quantizeModelEMAMethod · 0.45
_compileSubModuleFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
onGradMethod · 0.45
runMethod · 0.45
processMethod · 0.45

Calls 1

getSessionMethod · 0.45

Tested by 4

mainFunction · 0.36
runMethod · 0.36
runMethod · 0.36
printFunction · 0.36