diff --git a/tensorflow_privacy/privacy/dp_query/tree_aggregation.py b/tensorflow_privacy/privacy/dp_query/tree_aggregation.py index 6015545..c0a02fc 100644 --- a/tensorflow_privacy/privacy/dp_query/tree_aggregation.py +++ b/tensorflow_privacy/privacy/dp_query/tree_aggregation.py @@ -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: