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

Function calc_output_shape

dnn/test/cuda/deformable_conv.cpp:12–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11namespace {
12void calc_output_shape(
13 const size_t& ih, const size_t& iw, const size_t& fh, const size_t& fw,
14 const size_t& ph, const size_t& pw, const size_t& sh, const size_t& sw,
15 const size_t& dh, const size_t& dw, size_t& oh, size_t& ow) {
16 auto kh = 1 + (fh - 1) * dh;
17 auto kw = 1 + (fw - 1) * dw;
18
19 int deduced_oh = ((int)ih + ph * 2 - kh) / sh + 1;
20 int deduced_ow = ((int)iw + pw * 2 - kw) / sw + 1;
21 oh = deduced_oh, ow = deduced_ow;
22}
23} // namespace
24
25TEST_F(CUDA, DEFORMABLE_CONV_FWD) {

Callers 1

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected