bgawrych commented on code in PR #21034:
URL: https://github.com/apache/incubator-mxnet/pull/21034#discussion_r881341406


##########
src/api/operator/numpy_extension/npx_leaky_relu_op.cc:
##########
@@ -41,8 +41,10 @@ inline int String2ActType(const std::string& s) {
     return leakyrelu::kELU;
   } else if (s == "selu") {
     return leakyrelu::kSELU;
-  } else if (s == "gelu") {
-    return leakyrelu::kGELU;
+  } else if (s == "gelu" || s == "gelu_erf") {

Review Comment:
   backward compability



##########
src/operator/leaky_relu.cc:
##########
@@ -166,7 +166,10 @@ when the input is negative and has a slope of one when 
input is positive.
 The following modified ReLU Activation functions are supported:
 
 - *elu*: Exponential Linear Unit. `y = x > 0 ? x : slope * (exp(x)-1)`
-- *gelu*: Gaussian Error Linear Unit. `y = 0.5 * x * (1 + erf(x / sqrt(2)))`
+- *gelu*: Same as gelu_erf
+- *gelu_erf*: Gaussian Error Linear Unit. `y = 0.5 * x * (1 + erf(x / 
sqrt(2)))`

Review Comment:
   done



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to