digantamisra98 commented on a change in pull request #20320:
URL: https://github.com/apache/incubator-mxnet/pull/20320#discussion_r648669856
##########
File path: src/common/cuda/rtc/forward_functions-inl.h
##########
@@ -694,6 +694,15 @@ __device__ inline DType log_sigmoid(const DType val) {
}
}
+template <typename DType>
+__device__ inline DType mish(const DType val) {
+ if (type_util::has_double_or_integral<DType>::value) {
+ return val * ::tanh(::log(1 + ::exp(val)));
Review comment:
Yes, agreed, usually Softplus has an upper bound of 20.
--
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]