apeforest commented on a change in pull request #11356: [MXNET-560][WIP] Add temperature parameter in Softmax and SoftmaxOutput operator URL: https://github.com/apache/incubator-mxnet/pull/11356#discussion_r197303252
########## File path: src/operator/nn/softmax-inl.h ########## @@ -127,7 +137,7 @@ inline void SoftmaxGrad(Stream<cpu> *s, DType *out, DType *ograd, #ifdef __CUDACC__ template<int x_bits, typename OP, typename DType, int ndim> __global__ void softmax_compute_kernel(DType *in, DType *out, index_t M, int axis, - Shape<ndim> sshape, Shape<ndim> stride) { + Shape<ndim> sshape, Shape<ndim> stride, float temperature) { Review comment: Thanks for your suggestion. But I do not seem to find the convention of using const for pass-by-value parameter in the Google style guide: ``` If a function guarantees that it will not modify an argument passed by reference or by pointer, the corresponding function parameter should be a reference-to-const (const T&) or pointer-to-const (const T*), respectively. ``` In fact, adding unnecessary const declaration will put restriction on the caller of the library function. ---------------------------------------------------------------- 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