From 59da41e8182399438641e021b2f57fb6ee5246bc Mon Sep 17 00:00:00 2001 From: xiaolil1 Date: Fri, 9 Nov 2018 13:24:13 +0800 Subject: [PATCH] fix weight fmt bug for dwc conv (mobilenet) --- 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..b3fc153c28a 100644 --- a/paddle/fluid/operators/conv_mkldnn_op.cc +++ b/paddle/fluid/operators/conv_mkldnn_op.cc @@ -511,8 +511,7 @@ class ConvMKLDNNOpKernel : public paddle::framework::OpKernel { src_md.reset(new mkldnn::memory::desc(platform::MKLDNNMemDesc( src_tz, memory::data_type::u8, chosen_memory_format))); weights_md.reset(new mkldnn::memory::desc(platform::MKLDNNMemDesc( - weights_tz, memory::data_type::s8, - (g == 1) ? chosen_memory_format : mkldnn::memory::format::goihw))); + weights_tz, memory::data_type::s8, chosen_memory_format))); auto dst_dt = fuse_relu? paddle::framework::ToMKLDNNDataType(std::type_index(typeid(unsigned char))) : paddle::framework::ToMKLDNNDataType(std::type_index(typeid(signed char))); if(fuse_residual_conn){ auto residual = ctx.Input("ResidualData"); -- GitLab