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

Function EnumMobileNetWidthTypeByString

benchmark/exprModels/MobileNetExpr.hpp:25–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23};
24
25static inline MobileNetWidthType EnumMobileNetWidthTypeByString(const std::string& key) {
26 auto mobileNetWidthTypeMap = std::map<std::string, MobileNetWidthType>({
27 {"1.0", MobileNet_100},
28 {"0.75", MobileNet_075},
29 {"0.5", MobileNet_050},
30 {"0.25", MobileNet_025}});
31 auto mobileNetWidthTypeIter = mobileNetWidthTypeMap.find(key);
32 if (mobileNetWidthTypeIter == mobileNetWidthTypeMap.end()) {
33 return (MobileNetWidthType)(-1);
34 }
35 return mobileNetWidthTypeIter->second;
36}
37
38static inline MobileNetResolutionType EnumMobileNetResolutionTypeByString(const std::string& key) {
39 auto mobileNetResolutionTypeMap = std::map<std::string, MobileNetResolutionType>({

Callers 1

mainFunction · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected