apeforest commented on a change in pull request #15531: [MXNET-978] Higher
Order Gradient Support `arctan`, `arctanh`, `radians`.
URL: https://github.com/apache/incubator-mxnet/pull/15531#discussion_r305531609
##########
File path: src/operator/tensor/elemwise_unary_op_trig.cc
##########
@@ -201,7 +202,35 @@ The storage type of ``arctan`` output depends upon the
input storage type:
.set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{ "_backward_arctan"
});
MXNET_OPERATOR_REGISTER_BINARY_WITH_SPARSE_CPU_DR(_backward_arctan,
-
unary_bwd<mshadow_op::arctan_grad>);
+
unary_bwd<mshadow_op::arctan_grad>)
+.set_attr<nnvm::FGradient>("FGradient",
+ [](const nnvm::NodePtr& n, const std::vector<nnvm::NodeEntry>& ograds) {
+ // ograds[0]: head_grad_grads (dL/dy_grad)
Review comment:
Isn't it dL/dx_grad?
----------------------------------------------------------------
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]
With regards,
Apache Git Services