From 7b5ea7062bd1662dedee186f0907db5587106093 Mon Sep 17 00:00:00 2001 From: Haihao Shen Date: Fri, 9 Nov 2018 13:53:25 +0800 Subject: [PATCH] Fix the weight md for group convolution --- paddle/fluid/operators/conv_mkldnn_op.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paddle/fluid/operators/conv_mkldnn_op.cc b/paddle/fluid/operators/conv_mkldnn_op.cc index e9c2deb6ba5..05f44e1c0b6 100644 --- a/paddle/fluid/operators/conv_mkldnn_op.cc +++ b/paddle/fluid/operators/conv_mkldnn_op.cc @@ -566,8 +566,7 @@ class ConvMKLDNNOpKernel : public paddle::framework::OpKernel { src_md.reset(new mkldnn::memory::desc(platform::MKLDNNMemDesc( src_tz, platform::MKLDNNGetDataType(), chosen_memory_format))); weights_md.reset(new mkldnn::memory::desc(platform::MKLDNNMemDesc( - weights_tz, platform::MKLDNNGetDataType(), - (g == 1) ? chosen_memory_format : mkldnn::memory::format::goihw))); + weights_tz, platform::MKLDNNGetDataType(), chosen_memory_format))); dst_md.reset(new mkldnn::memory::desc(platform::MKLDNNMemDesc( dst_tz, platform::MKLDNNGetDataType(), chosen_memory_format))); mds[2] = src_md; -- GitLab