提交 45ced8e0 编写于 作者: L Liubov Batanina

Fix ONNX deconvolution

上级 5c0a98cf
......@@ -622,6 +622,14 @@ void ONNXImporter::populateNet(Net dstNet)
layerParams.set("adj_h", (outH - kernelH) % strideY);
}
}
else if (layerParams.has("output_padding"))
{
const DictValue& adj_pad = layerParams.get("output_padding");
if (adj_pad.size() != 2)
CV_Error(Error::StsNotImplemented, "Deconvolution3D layer is not supported");
layerParams.set("adj_w", adj_pad.get<int>(1));
layerParams.set("adj_h", adj_pad.get<int>(0));
}
}
else if (layer_type == "Transpose")
{
......
......@@ -100,6 +100,7 @@ TEST_P(Test_ONNX_layers, Deconvolution)
testONNXModels("two_deconvolution");
testONNXModels("deconvolution_group");
testONNXModels("deconvolution_output_shape");
testONNXModels("deconv_adjpad_2d");
}
TEST_P(Test_ONNX_layers, Dropout)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册