marcoabreu commented on a change in pull request #11631: Fix batchnorm problem 
with sparse matrices when fix_gamma=True
URL: https://github.com/apache/incubator-mxnet/pull/11631#discussion_r201451102
 
 

 ##########
 File path: src/operator/nn/batch_norm.cc
 ##########
 @@ -452,19 +453,56 @@ static inline bool BatchNormStorageType(const 
nnvm::NodeAttrs &attrs,
                                         std::vector<int> *out_attrs) {
   CHECK_EQ(in_attrs->size(), 5);
   CHECK_EQ(out_attrs->size(), 3);
+  const BatchNormParam &param = nnvm::get<BatchNormParam>(attrs.parsed);
+
+  if ((common::ContainsStorageType(*in_attrs, kRowSparseStorage) ||
+       common::ContainsStorageType(*in_attrs, kCSRStorage)) &&
+      param.fix_gamma) {
+    LOG(FATAL) << "fix_gamma=True is not supported for sparse ndarrays";
 
 Review comment:
   Could you please create a GitHub issue as feature request and link it in 
this message so users are able to follow up?
   
   We should also add this to the known problems for the next release. 
@Roshrini do we already have a release manager for 1.3?
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to