MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / make_divisible

Function make_divisible

src/gopt/test/network.cpp:334–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332
333namespace {
334size_t make_divisible(size_t v, size_t divisor) {
335 size_t min_value = divisor;
336 size_t new_v = std::max(min_value, (v + divisor / 2) / divisor * divisor);
337 if (new_v < 0.9 * v)
338 new_v += divisor;
339 return new_v;
340}
341} // namespace
342
343SymbolVar mgb::make_mobilenet_v2(Network& network, size_t batch, DType out_dtype) {

Callers 1

make_mobilenet_v2Method · 0.85

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected