You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/08/03 14:03:49 UTC

[GitHub] apaleyes commented on a change in pull request #7041: Implementation of cbrt and rcbrt operators

apaleyes commented on a change in pull request #7041: Implementation of cbrt and rcbrt operators
URL: https://github.com/apache/incubator-mxnet/pull/7041#discussion_r131150370
 
 

 ##########
 File path: src/operator/mshadow_op.h
 ##########
 @@ -604,6 +604,36 @@ struct reciprocal_square_root_grad {
   }
 };
 
+/*!\ \brief used for generate element cbrt */
+struct cube_root {
+  template<typename DType>
+  MSHADOW_XINLINE static DType Map(DType a) {
+    return DType(cbrtf(a));
+  }
+};
+
+struct cube_root_grad {
+  template<typename DType>
+  MSHADOW_XINLINE static DType Map(DType a) {
+    return DType(DType(1.0f) / ( DType(3.0f) * a * a));
 
 Review comment:
   @piiswrong any insight here? Thanks!
 
----------------------------------------------------------------
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