Fix regression caused by PR #1868

This commit is contained in:
Reuben Morais 2021-05-18 16:54:29 +02:00
parent 5ad6e6abbf
commit 5114362f6d
1 changed files with 8 additions and 10 deletions

View File

@ -255,8 +255,6 @@ def tf_pick_value_from_range(value_range, clock=None, double_precision=False):
tf.minimum(tf.constant(1.0, dtype=tf.float64), clock), tf.minimum(tf.constant(1.0, dtype=tf.float64), clock),
) )
value = value_range.start + clock * (value_range.end - value_range.start) value = value_range.start + clock * (value_range.end - value_range.start)
if value_range.r:
# if the option <r> (<value>~<r>, randomization radius) is supplied,
# sample the value from a uniform distribution with "radius" <r> # sample the value from a uniform distribution with "radius" <r>
value = tf.random.stateless_uniform( value = tf.random.stateless_uniform(
[], [],