forked from 626_privacy/tensorflow_privacy
Expose noise_multiplier
and l2_norm_clip
as public read-only attributes.
PiperOrigin-RevId: 642298339
This commit is contained in:
parent
99c25e3be5
commit
00384db109
1 changed files with 8 additions and 0 deletions
|
@ -157,6 +157,14 @@ def make_dp_model_class(cls):
|
|||
self.train_step, experimental_compile=True
|
||||
)
|
||||
|
||||
@property
|
||||
def noise_multiplier(self):
|
||||
return self._noise_multiplier
|
||||
|
||||
@property
|
||||
def l2_norm_clip(self):
|
||||
return self._l2_norm_clip
|
||||
|
||||
def _process_per_example_grads(self, grads):
|
||||
grads_flat = tf.nest.flatten(grads)
|
||||
squared_l2_norms = [
|
||||
|
|
Loading…
Reference in a new issue