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

Function set_nchw_args

dnn/test/arm_common/resize.cpp:11–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9using namespace resize;
10
11static void set_nchw_args(IMode imode, std::vector<TestArg>& args) {
12 param::Resize param;
13 param.format = param::Resize::Format::NCHW;
14 param.imode = imode;
15 rep(n, 4ul) rep(c, 4ul) rep(ih, 4ul) rep(iw, 4ul) rep(oh, 4ul) rep(ow, 4ul)
16 args.emplace_back(
17 param, TensorShape{n + 1ul, c + 1ul, ih + 1ul, iw + 1ul},
18 TensorShape{n + 1ul, c + 1ul, oh + 1ul, ow + 1ul});
19 args.emplace_back(param, TensorShape{1, 1, 10, 10}, TensorShape{1, 1, 20, 20});
20 args.emplace_back(param, TensorShape{1, 1, 10, 10}, TensorShape{1, 1, 7, 9});
21 args.emplace_back(param, TensorShape{2, 2, 3, 4}, TensorShape{2, 2, 6, 8});
22 args.emplace_back(param, TensorShape{1, 2, 6, 8}, TensorShape{1, 2, 3, 4});
23}
24
25TEST_F(ARM_COMMON, RESIZE_CV) {
26 std::vector<TestArg> args = get_cv_args();

Callers 1

TEST_FFunction · 0.70

Calls 2

emplace_backMethod · 0.80
repFunction · 0.50

Tested by

no test coverage detected