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 2021/06/10 00:01:51 UTC

[GitHub] [incubator-mxnet] Adnios commented on a change in pull request #20320: [operator] Add Mish Activation Function

Adnios commented on a change in pull request #20320:
URL: https://github.com/apache/incubator-mxnet/pull/20320#discussion_r648759877



##########
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. Thanks for your advice.




-- 
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:
users@infra.apache.org