Commit 0431ecb9 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #14408 from l-bat:onnx_deconv

parents cd879bed 45ced8e0
...@@ -623,6 +623,14 @@ void ONNXImporter::populateNet(Net dstNet) ...@@ -623,6 +623,14 @@ void ONNXImporter::populateNet(Net dstNet)
layerParams.set("adj_h", (outH - kernelH) % strideY); 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") else if (layer_type == "Transpose")
{ {
......
...@@ -100,6 +100,7 @@ TEST_P(Test_ONNX_layers, Deconvolution) ...@@ -100,6 +100,7 @@ TEST_P(Test_ONNX_layers, Deconvolution)
testONNXModels("two_deconvolution"); testONNXModels("two_deconvolution");
testONNXModels("deconvolution_group"); testONNXModels("deconvolution_group");
testONNXModels("deconvolution_output_shape"); testONNXModels("deconvolution_output_shape");
testONNXModels("deconv_adjpad_2d");
} }
TEST_P(Test_ONNX_layers, Dropout) TEST_P(Test_ONNX_layers, Dropout)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment