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/06/29 20:09:53 UTC

[GitHub] haojin2 commented on a change in pull request #11466: [MXNET-560] Add temperature parameter in Softmax operator

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

 ##########
 File path: src/operator/nn/softmax-inl.h
 ##########
 @@ -53,7 +53,7 @@ struct log_softmax_fwd {
 
 template<typename OP, typename DType, int ndim>
 inline void Softmax(Stream<cpu> *s, DType *in, DType *out,
-                    Shape<ndim> shape, int axis) {
+                    Shape<ndim> shape, int axis, const float temperature) {
 
 Review comment:
   This is a parameter, so it should be of a specific type. I think to ensure the highest precision we should take this parameter in as a double type and cast it to the DType during runtime.

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