nswamy commented on a change in pull request #11466: [MXNET-560] Add 
temperature parameter in Softmax operator
URL: https://github.com/apache/incubator-mxnet/pull/11466#discussion_r203784706
 
 

 ##########
 File path: src/operator/nn/softmax-inl.h
 ##########
 @@ -71,12 +71,22 @@ inline void Softmax(Stream<cpu> *s, DType *in, DType *out,
     }
 
     DType sum = DType(0);
-    for (index_t j = 0; j < M; ++j) {
-      sum += std::exp(in[base + j*sa] - mmax);
-    }
+    if (temperature == 1.0) {
 
 Review comment:
   I meant in the code :)

----------------------------------------------------------------
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