diff --git a/paddle/fluid/operators/conv_mkldnn_op.cc b/paddle/fluid/operators/conv_mkldnn_op.cc index e9c2deb6ba51b80a5a5978fde57dbf25446a7f86..05f44e1c0b65f9b9cccf794f21cb4a0f43551328 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;