We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c92610e commit feb0f99Copy full SHA for feb0f99
tensorflow_privacy/privacy/dp_query/normalized_query.py
@@ -73,7 +73,7 @@ def get_noised_result(self, sample_state, global_state):
73
sample_state, global_state.numerator_state)
74
75
def normalize(v):
76
- return tf.truediv(v, global_state.denominator)
+ return tf.truediv(v, tf.cast(global_state.denominator, v.dtype))
77
78
# The denominator is constant so the privacy cost comes from the numerator.
79
return (tf.nest.map_structure(normalize, noised_sum),
0 commit comments