Skip to content

Commit c729fbd

Browse files
committed
Merge pull request opencv#10925 from pengli:dnn
2 parents 5caf624 + 608968a commit c729fbd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

modules/dnn/src/layers/convolution_layer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,8 +1390,8 @@ class DeConvolutionLayerImpl : public BaseConvolutionLayerImpl
13901390
{
13911391
int total = outGroupCn * decnBlob.cols;
13921392
int index = 0;
1393-
int height_col = (outH + 2 * pad.height - kernel.height) / stride.height + 1;
1394-
int width_col = (outW + 2 * pad.width - kernel.width) / stride.width + 1;
1393+
int height_col = inpH;
1394+
int width_col = inpW;
13951395
int coeff_h = (1 - stride.height * kernel.width * height_col) * width_col;
13961396
int coeff_w = (1 - stride.width * height_col * width_col);
13971397

modules/dnn/test/test_tf_importer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ TEST(Test_TensorFlow, deconvolution)
181181
OCL_TEST(Test_TensorFlow, deconvolution)
182182
{
183183
runTensorFlowNet("deconvolution", DNN_TARGET_OPENCL);
184+
runTensorFlowNet("deconvolution_same", DNN_TARGET_OPENCL);
185+
runTensorFlowNet("deconvolution_stride_2_same", DNN_TARGET_OPENCL);
186+
runTensorFlowNet("deconvolution_adj_pad_valid", DNN_TARGET_OPENCL);
187+
runTensorFlowNet("deconvolution_adj_pad_same", DNN_TARGET_OPENCL);
184188
}
185189

186190
TEST(Test_TensorFlow, matmul)

0 commit comments

Comments
 (0)