Skip to content

Commit

Permalink
Merge pull request opencv#13882 from dkurt:fix_13479
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Feb 21, 2019
2 parents 7baa5ef + bfd663c commit 0e70363
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions modules/dnn/src/layers/convolution_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,12 +1217,8 @@ class DeConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl
int dims[] = {inputs[0][0], outCn, outH, outW};
outputs.resize(inputs.size(), shape(dims, 4));

internals.push_back(MatShape());
if (!is1x1())
internals[0] = computeColRowShape(inputs[0], outputs[0]);

if (hasBias())
internals.push_back(shape(1, outH*outW));
internals.push_back(computeColRowShape(inputs[0], outputs[0]));

return false;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/dnn/src/onnx/onnx_importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ void ONNXImporter::populateNet(Net dstNet)
for (int j = 1; j < node_proto.input_size(); j++) {
layerParams.blobs.push_back(getBlob(node_proto, constBlobs, j));
}
layerParams.set("num_output", layerParams.blobs[0].size[1]);
layerParams.set("num_output", layerParams.blobs[0].size[1] * layerParams.get<int>("group", 1));
layerParams.set("bias_term", node_proto.input_size() == 3);
}
else if (layer_type == "Transpose")
Expand Down
1 change: 1 addition & 0 deletions modules/dnn/test/test_onnx_importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ TEST_P(Test_ONNX_layers, Deconvolution)
{
testONNXModels("deconvolution");
testONNXModels("two_deconvolution");
testONNXModels("deconvolution_group");
}

TEST_P(Test_ONNX_layers, Dropout)
Expand Down

0 comments on commit 0e70363

Please sign in to comment.