You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/03/28 12:46:16 UTC

[GitHub] TaoLv commented on a change in pull request #10275: [WIP] Fix the default layout in the MKLDNN integration

TaoLv commented on a change in pull request #10275: [WIP] Fix the default layout in the MKLDNN integration
URL: https://github.com/apache/incubator-mxnet/pull/10275#discussion_r177735188
 
 

 ##########
 File path: src/operator/nn/mkldnn/mkldnn_base.cc
 ##########
 @@ -201,14 +198,19 @@ mkldnn_memory_format_t GetDefaultFormat(mkldnn::memory::desc desc) {
   } else if (desc.data.ndims == 4) {
     switch (desc.data.format) {
       case mkldnn_nchw:
-      case mkldnn_nhwc:
-      case mkldnn_chwn:
       case mkldnn_nChw8c:
       case mkldnn_nChw16c:
         return mkldnn_nchw;
+      case mkldnn_nhwc:
+        return mkldnn_nhwc;
+      case mkldnn_chwn:
+        return mkldnn_chwn;
 
 Review comment:
   Seems I lack some of background here. So mxnet has several different **default** layouts for 4D image data? How does NDArray tell the difference of nchw and nhwc?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services