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

Method load

express/Expr.cpp:991–1009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

989}
990
991std::vector<VARP> Variable::load(const char* fileName) {
992 AutoStorage<uint8_t> buffer;
993 {
994 FileLoader loader(fileName, true);
995 if (!loader.valid()) {
996 MNN_ERROR("Error for open %s\n", fileName);
997 return {};
998 }
999 loader.read();
1000 if (!loader.valid()) {
1001 return {};
1002 }
1003 loader.merge(buffer);
1004 if (buffer.get() == nullptr) {
1005 return {};
1006 }
1007 }
1008 return load(buffer.get(), buffer.size());
1009}
1010std::vector<VARP> Variable::load(const uint8_t* buffer, size_t length) {
1011 AUTOTIME;
1012 if (false == OpCommonUtils::checkNet(buffer, length)) {

Callers 15

GetCachedSizeMethod · 0.45
arenastring.ccFile · 0.45
_InternalSerializeMethod · 0.45
SpaceAllocatedFunction · 0.45
GetSerialArenaFastFunction · 0.45
PerSerialArenaFunction · 0.45
SwapStateMethod · 0.45
IsMapValidMethod · 0.45
IsRepeatedFieldValidMethod · 0.45
SwapMethod · 0.45

Calls 15

UnPackNetFunction · 0.85
loadFunction · 0.50
initTensorsFunction · 0.50
createFunction · 0.50
cloneFunction · 0.50
validMethod · 0.45
readMethod · 0.45
mergeMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected