Skip to content

Commit 72f60de

Browse files
committed
fix randomuniform UT
1 parent 81cdbd9 commit 72f60de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_backend.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,8 @@ def test_randomuniform_dyn_shape(self):
13901390
# test for dynamic shape coming from a shape op
13911391
x_val = np.array([0, 1, 2, 3, 5], dtype=np.int64)
13921392
def func(x):
1393-
return random_uniform(x[3:], name=_TFOUTPUT, dtype=tf.float32)
1393+
ret = random_uniform(x[3:], dtype=tf.float32)
1394+
return tf.identity(ret, name=_TFOUTPUT)
13941395
# since results are random, compare the shapes only
13951396
self._run_test_case(func, [_OUTPUT], {_INPUT: x_val}, check_value=False, check_shape=True)
13961397

0 commit comments

Comments
 (0)