kshitij12345 commented on a change in pull request #15611: [MXNET-978] n-th
order gradient test support
URL: https://github.com/apache/incubator-mxnet/pull/15611#discussion_r306477501
##########
File path: tests/python/unittest/test_higher_order_grad.py
##########
@@ -148,30 +165,48 @@ def grad_grad_op(x):
shape = rand_shape_nd(dim)
array = random_arrays(shape)
check_second_order_unary(array, sigmoid, grad_grad_op)
+ # TODO(kshitij12345): Remove
+ check_nth_order_unary(array, sigmoid, [grad_op, grad_grad_op], [1, 2])
+ check_nth_order_unary(array, sigmoid, grad_grad_op, 2)
def check_second_order_unary(x, op, grad_grad_op):
+ check_nth_order_unary(x, op, grad_grad_op, 2)
+
+
+def check_nth_order_unary(x, op, grad_ops, orders):
Review comment:
I have added the docstring. Could you please take a look to see if it needs
more polishing.
Thank You.
----------------------------------------------------------------
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