5433436b863ec9d5822e4261e1b0637a4396a197,tensorflow_privacy/privacy/dp_query/gaussian_query.py,GaussianSumQuery,make_global_state,#GaussianSumQuery#,56
Before Change
def make_global_state(self, l2_norm_clip, stddev):
Creates a global state from the given parameters.
return self._GlobalState(tf.cast(l2_norm_clip, tf.float32),
tf.cast(stddev, tf.float32))
def initial_global_state(self):
return self.make_global_state(self._l2_norm_clip, self._stddev)
After Change
Creates a global state from the given parameters.
l2_norm_clip = float(l2_norm_clip) if isinstance(
l2_norm_clip, numbers.Number) else tf.cast(l2_norm_clip, tf.float32)
stddev = float(stddev) if isinstance(stddev, numbers.Number) else tf.cast(
stddev, tf.float32)
return self._GlobalState(l2_norm_clip, stddev)
def initial_global_state(self):
return self.make_global_state(self._l2_norm_clip, self._stddev)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: tensorflow/privacy
Commit Name: 5433436b863ec9d5822e4261e1b0637a4396a197
Time: 2020-08-06
Author: schien@google.com
File Name: tensorflow_privacy/privacy/dp_query/gaussian_query.py
Class Name: GaussianSumQuery
Method Name: make_global_state
Project Name: maciejkula/spotlight
Commit Name: 2767c948afa434f863df3b5eb1946a032dfba588
Time: 2017-07-13
Author: maciej.kula@gmail.com
File Name: spotlight/losses.py
Class Name:
Method Name: hinge_loss
Project Name: oddt/oddt
Commit Name: e630777aac8756de582089791ab8d82354c2e21b
Time: 2016-02-23
Author: maciek@wojcikowski.pl
File Name: oddt/metrics.py
Class Name:
Method Name: enrichment_factor