MCPcopy Create free account
hub / github.com/alibaba/MNN / run

Method run

test/op/DeconvolutionTest.cpp:224–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222public:
223 virtual ~DeconvolutionFullTest() = default;
224 virtual bool run(int precision) {
225 if (MNN_FORWARD_OPENCL == getCurrentType()) {
226 MNN_ERROR("Currently opencl run deconvolution has error, skip it\n");
227 return true;
228 }
229 int ocStep = 1;
230 int icStep = 1;
231 int isStep = 3;
232 std::vector<int> ocSize = {
233 1, 3, 10, 17
234 };
235 std::vector<int> icSize = {
236 1, 4, 3, 8, 11
237 };
238 std::vector<int> isSize = {
239 1, 7, 9, 13
240 };
241
242 for (int batch = 1; batch <= 2; batch++) {
243 for (auto oc : ocSize) {
244 for (auto ic : icSize) {
245 for (auto is : isSize) {
246 int ih = is;
247 int iw = is;
248 for (int kw = 1; kw <= 7 && kw <= is; kw+=2) {
249 for (int kh = 1; kh <= 7 && kh <= is; kh+=3) {
250 for (int d = 1; d <= 2; d++) {
251 for (int s = 1; s <= 2; s++) {
252 int stride = s;
253 for (int p = 0; p <= 1; p++) {
254 std::ostringstream name;
255 int pad_w = p;
256 int pad_h = p;
257 name << "Deconvolution: " << batch <<","<< oc <<","<<ic<<","<<is<<"["<< kw <<","<<kh <<"][s:" << s << ",p:"
258 <<p << ",d:"<<d<<"]";
259 bool succ = DeconvolutionCommonTest::test(name.str(),batch, ic, oc, ih, iw, pad_h, pad_w, kh, kw, stride, d, 1, precision);
260 if (!succ) {
261 return false;
262 }
263 }
264 }
265 }
266 }
267 }
268 }
269 }
270 }
271 }
272 return true;
273 }
274};
275
276class DeconvolutionTest : public DeconvolutionCommonTest {

Callers

nothing calls this directly

Calls 3

getCurrentTypeFunction · 0.85
testFunction · 0.50
strMethod · 0.45

Tested by

no test coverage detected