We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ef2fb7 commit b5e79f9Copy full SHA for b5e79f9
tests/python/frontend/onnx/test_forward.py
@@ -4913,6 +4913,24 @@ def test_random_uniform():
4913
vals_2 = get_random_uniform(shape=[10], seed=1)
4914
assert all(vals_1 == vals_2)
4915
4916
+ # Test against an expected output with a fixed seed.
4917
+ real = get_random_uniform(shape=[10], seed=5)
4918
+ expected = np.asarray(
4919
+ [
4920
+ 0.8614111,
4921
+ 0.46572232,
4922
+ 0.6007328,
4923
+ 0.21619737,
4924
+ 0.6361222,
4925
+ 0.7298056,
4926
+ 0.13094282,
4927
+ 0.03556716,
4928
+ 0.32997167,
4929
+ 0.2977605,
4930
+ ]
4931
+ )
4932
+ tvm.testing.assert_allclose(real, expected, rtol=1e-5)
4933
+
4934
4935
if __name__ == "__main__":
4936
test_flatten()
0 commit comments