Fix ONNX deconvolution

This commit is contained in:
Liubov Batanina 2019-04-24 14:18:14 +03:00
parent 5c0a98cfb6
commit 45ced8e022
2 changed files with 9 additions and 0 deletions

View File

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

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)