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

Function fusion_pyramids_feature

src/gopt/test/network.cpp:263–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263SymbolVarArray fusion_pyramids_feature(
264 Network& network, SymbolVarArray pyramids, size_t fpn_conv_channels) {
265 bool touch = false;
266 SymbolVar x;
267 SymbolVarArray fpn;
268 for (int i = 5; i >= 3; --i) {
269 auto f = network.add_conv(
270 pyramids[i - 2], fpn_conv_channels, {1, 1}, dtype::QuantizedS8{1.f},
271 false, {1, 1}, {0, 0});
272 if (!touch) {
273 x = f;
274 touch = true;
275 } else {
276 x = network.add_deconv(x, 2, 16, dtype::QuantizedS8{1.f});
277 x = network.add_elemwise(
278 {x, f}, dtype::QuantizedS8{1.f}, opr::Elemwise::Mode::ADD);
279 }
280 fpn.push_back(x);
281 }
282
283 x = fpn[0];
284 for (int i = 6; i < 8; ++i) {
285 x = network.add_conv(
286 x, fpn_conv_channels, {3, 3}, dtype::QuantizedS8{1.f}, true, {2, 2},
287 {1, 1});
288 }
289 return fpn;
290}
291} // namespace
292
293SymbolVarArray mgb::make_det(Network& network, size_t batch, DType out_dtype) {

Callers 1

make_detMethod · 0.85

Calls 4

add_convMethod · 0.80
add_deconvMethod · 0.80
add_elemwiseMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected