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

Function mobileNetV2Expr

benchmark/exprModels/MobileNetExpr.cpp:105–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105VARP mobileNetV2Expr(int numClass) {
106 auto x = _Input({1, 3, 224, 224}, NC4HW4);
107 x = _Conv(0.0f, 0.0f, x, {3, 32}, {3, 3}, SAME, {2, 2}, {1, 1}, 1);
108 x = bottleNeckBlock(x, {32, 16}, 1, 1, 1);
109 x = bottleNeckBlock(x, {16, 24}, 2, 6, 2);
110 x = bottleNeckBlock(x, {24, 32}, 2, 6, 3);
111 x = bottleNeckBlock(x, {32, 64}, 2, 6, 4);
112 x = bottleNeckBlock(x, {64, 96}, 1, 6, 3);
113 x = bottleNeckBlock(x, {96, 160}, 2, 6, 3);
114 x = bottleNeckBlock(x, {160, 320}, 1, 6, 1);
115 x = _Conv(0.0f, 0.0f, x, {320, 1280}, {1, 1}, VALID, {1, 1}, {1, 1}, 1);
116 x = _AvePool(x, {7, 7}, {1, 1}, VALID);
117 x = _Conv(0.0f, 0.0f, x, {1280, numClass}, {1, 1}, VALID, {1, 1}, {1, 1}, 1); // reshape FC with Conv1x1
118 return x;
119}

Callers 1

mainFunction · 0.85

Calls 4

_InputFunction · 0.85
_AvePoolFunction · 0.85
bottleNeckBlockFunction · 0.70
_ConvFunction · 0.50

Tested by

no test coverage detected