apeforest commented on a change in pull request #15169: Softmax with length URL: https://github.com/apache/incubator-mxnet/pull/15169#discussion_r302822362
########## File path: src/operator/nn/softmax-inl.h ########## @@ -113,6 +113,60 @@ inline void Softmax(Stream<cpu> *s, DType *in, OType *out, } } +template<typename OP, bool negate, typename AType, typename DType, typename OType, + typename IType, int ndim> +inline void SoftmaxWithLength(Stream<cpu> *s, DType *in, OType *out, IType *length, Review comment: Can we merge this function with Softmax (treat length = M in the default case). Creating two functions just to serve one extra argument seems to be an overkill ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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
