szhengac commented on a change in pull request #18852:
URL: https://github.com/apache/incubator-mxnet/pull/18852#discussion_r464699654
##########
File path: tests/python/unittest/test_numpy_op.py
##########
@@ -4777,6 +4777,57 @@ def _test_gamma_exception(shape, scale):
assertRaises(ValueError, _test_gamma_exception, shape, scale)
+@with_seed()
+@use_np
+def test_gamma_grad():
+ class TestRandomGamma(HybridBlock):
+ def __init__(self, size, beta):
+ super(TestRandomGamma, self).__init__()
+ self._size = size
+ self._beta = beta
+
+ def hybrid_forward(self, F, a):
+ return F.np.random.gamma(a, 1.0, self._size) * self._beta
Review comment:
see the section 5.1
----------------------------------------------------------------
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]