Merge pull request #14408 from l-bat:onnx_deconv

This commit is contained in:
Alexander Alekhin 2019-04-24 14:30:09 +00:00
commit 0431ecb9e2
2 changed files with 9 additions and 0 deletions

View File

@ -623,6 +623,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")
{

View File

@ -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)