Minor fix for the nondeterministic seed of tree_aggregation.GaussianNoiseGenerator. The previous log results won't change much, while one seed is probably good enough.
PiperOrigin-RevId: 390412713
This commit is contained in:
parent
b8c1ba72cd
commit
50673fec40
1 changed files with 3 additions and 1 deletions
|
@ -94,10 +94,12 @@ class GaussianNoiseGenerator(ValueGenerator):
|
|||
An initial state.
|
||||
"""
|
||||
if self.seed is None:
|
||||
time_now = tf.timestamp()
|
||||
residual = time_now - tf.math.floor(time_now)
|
||||
return tf.cast(
|
||||
tf.stack([
|
||||
tf.math.floor(tf.timestamp() * 1e6),
|
||||
tf.math.floor(tf.math.log(tf.timestamp() * 1e6))
|
||||
tf.math.floor(residual * 1e9)
|
||||
]),
|
||||
dtype=tf.int64)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue