From 6c79a35735157238188ae77ff282cd47588ad404 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 5 Sep 2023 11:55:04 -0700 Subject: [PATCH] WILL BE REMOVED. DO NOT SUBMIT. PiperOrigin-RevId: 562848204 --- tensorflow_privacy/privacy/dp_query/normalized_query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_privacy/privacy/dp_query/normalized_query.py b/tensorflow_privacy/privacy/dp_query/normalized_query.py index e6e1b9c9..07812e64 100644 --- a/tensorflow_privacy/privacy/dp_query/normalized_query.py +++ b/tensorflow_privacy/privacy/dp_query/normalized_query.py @@ -73,7 +73,7 @@ def get_noised_result(self, sample_state, global_state): sample_state, global_state.numerator_state) def normalize(v): - return tf.truediv(v, global_state.denominator) + return tf.truediv(v, tf.cast(global_state.denominator, v.dtype)) # The denominator is constant so the privacy cost comes from the numerator. return (tf.nest.map_structure(normalize, noised_sum),