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 2018/10/16 21:17:01 UTC

[GitHub] Roshrini commented on a change in pull request #12748: [MXNET-1028] Adding CELU Activation function

Roshrini commented on a change in pull request #12748: [MXNET-1028] Adding CELU Activation function
URL: https://github.com/apache/incubator-mxnet/pull/12748#discussion_r225710497
 
 

 ##########
 File path: tests/python/unittest/test_gluon.py
 ##########
 @@ -1035,6 +1035,16 @@ def elu(x):
     for test_point, ref_point in zip(elu_test(point_to_validate), elu(point_to_validate)):
         assert test_point == ref_point
 
+    celu = mx.gluon.nn.CELU()
+    def celu_test(x):
+        def celu(x):
+            alpha = 2.0
+            return alpha * (mx.nd.exp(x / alpha) - 1) if x < 0 else x
+        return [celu(x_i) for x_i in x]
+
+    for test_point, ref_point in zip(elu_test(point_to_validate), elu(point_to_validate)):
 
 Review comment:
   Shouldn't it call "celu_test()" instead of "elu_test()" 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:
users@infra.apache.org


With regards,
Apache Git Services