zheng-da commented on a change in pull request #11831: [MXNET-484] MKLDNN C++ 
test for LRN operator
URL: https://github.com/apache/incubator-mxnet/pull/11831#discussion_r209791360
 
 

 ##########
 File path: tests/cpp/operator/mkldnn.cc
 ##########
 @@ -610,8 +670,12 @@ std::vector<NDArrayAttrs> GetTestInputArrays(bool rand = 
false, int num_inputs =
            << shape.ndim() << "/" << pd.desc().data.ndims;
         desc = ss.str();
       }
-      InitMKLDNNArray(&arr, pd);
-      in_arrs.emplace_back(arr.Slice(slice_amount, arr.shape()[0] - 
slice_amount), desc);
+
+      if ((types & ArrayTypes::MKLDNNReshaped && shape.ndim() == 
pd.desc().data.ndims) ||
+          (types & ArrayTypes::MKLDNNReshapedDiffDim && shape.ndim() != 
pd.desc().data.ndims)) {
+        InitMKLDNNArray(&arr, pd, rand);
+        in_arrs.emplace_back(arr.Slice(slice_amount, arr.shape()[0] - 
slice_amount), desc);
+      }
 
 Review comment:
   it seems you miss type 4 here.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to