zhuzilin commented on a change in pull request #8041:
URL: https://github.com/apache/tvm/pull/8041#discussion_r634156686
##########
File path: python/tvm/relay/op/random/kernel.py
##########
@@ -132,3 +132,55 @@ def foo(key):
:py:func:`threefry_generate`.
"""
return _make.threefry_split(key)
+
+
+def uniform(key, shape, dtype="float32", low=0.0, high=1.0):
+ """Draw samples from a uniform distribution.
+
+ Samples are uniformly distributed over the half-open interval [low, high)
+ (includes low, but excludes high). In other words, any value within the
+ given interval is equally likely to be drawn by uniform.
+
+ Example
+ -------
+
+ .. code-block:: python
+
+ key = threefry_key(0)
+ random_values = uniform(key, (100,), low=0, high=10)
Review comment:
Fixed.
--
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]