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

Function get_chanwise_args

dnn/test/common/conv_bias.cpp:51–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51std::vector<TestArg> get_chanwise_args() {
52 std::vector<TestArg> args;
53 param::ConvBias cur_param;
54 using NLMode = param::ConvBias::NonlineMode;
55 cur_param.mode = param::ConvBias::Mode::CROSS_CORRELATION;
56 cur_param.sparse = ConvBias::Param::Sparse::GROUP;
57
58 for (auto nlmode :
59 {NLMode::IDENTITY, NLMode::RELU, NLMode::SIGMOID, NLMode::H_SWISH}) {
60 cur_param.nonlineMode = nlmode;
61 // simple case
62 for (uint32_t s : {1, 2})
63 for (uint32_t p : {0, 1, 2, 3})
64 for (size_t f : {2, 3, 5, 7})
65 for (size_t ocpg : {1, 3}) {
66 cur_param.pad_h = cur_param.pad_w = p;
67 cur_param.stride_h = cur_param.stride_w = s;
68 args.emplace_back(
69 cur_param, TensorShape{2, 3, 16, 16},
70 TensorShape{3, ocpg, 1, f, f},
71 TensorShape{1, 3 * ocpg, 1, 1});
72 }
73
74 args.emplace_back(
75 cur_param, TensorShape{32, 12, 20, 10}, TensorShape{12, 2, 1, 4, 5},
76 TensorShape{1, 24, 1, 1});
77
78 // padding larger than kern
79 args.emplace_back(
80 cur_param, TensorShape{32, 12, 20, 10}, TensorShape{12, 2, 1, 4, 5},
81 TensorShape{1, 24, 1, 1});
82 }
83 return args;
84}
85
86std::vector<TestArg> get_args_1x1() {
87 std::vector<TestArg> args;

Callers 4

TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85

Calls 1

emplace_backMethod · 0.80

Tested by

no test coverage detected