Add explicit package names to class __doc__ strings in optimizers directory.

PiperOrigin-RevId: 367516282
This commit is contained in:
Steve Chien 2021-04-08 15:11:16 -07:00 committed by A. Unique TensorFlower
parent 3c64cce796
commit 53ddbf81a0
4 changed files with 14 additions and 9 deletions

View file

@ -205,7 +205,8 @@ def make_optimizer_class(cls):
return super(DPOptimizerClass,
self).apply_gradients(grads_and_vars, global_step, name)
DPOptimizerClass.__doc__ = ('DP subclass of {}.').format(cls.__name__)
DPOptimizerClass.__doc__ = ('DP subclass of `tf.compat.v1.train.{}`.').format(
cls.__name__)
return DPOptimizerClass
@ -267,8 +268,9 @@ def make_gaussian_optimizer_class(cls):
def ledger(self):
return self._dp_sum_query.ledger
DPGaussianOptimizerClass.__doc__ = ('DP subclass of {} using Gaussian '
'averaging.').format(cls.__name__)
DPGaussianOptimizerClass.__doc__ = (
'DP subclass of `tf.train.{}` using Gaussian averaging.').format(
cls.__name__)
return DPGaussianOptimizerClass

View file

@ -169,8 +169,9 @@ def make_keras_optimizer_class(cls):
return super(DPOptimizerClass,
self).apply_gradients(grads_and_vars, global_step, name)
DPOptimizerClass.__doc__ = ('DP subclass of {} using Gaussian '
'averaging.').format(cls.__name__)
DPOptimizerClass.__doc__ = (
'DP subclass of `tf.keras.optimizers.{}` using Gaussian averaging.'
).format(cls.__name__)
return DPOptimizerClass

View file

@ -177,8 +177,9 @@ def make_vectorized_keras_optimizer_class(cls):
return super(DPOptimizerClass,
self).apply_gradients(grads_and_vars, global_step, name)
DPOptimizerClass.__doc__ = ('Vectorized DP subclass of {} using Gaussian '
'averaging.').format(cls.__name__)
DPOptimizerClass.__doc__ = (
'Vectorized DP subclass of `tf.keras.optimizers.{}` using Gaussian '
'averaging.').format(cls.__name__)
return DPOptimizerClass

View file

@ -136,8 +136,9 @@ def make_vectorized_optimizer_class(cls):
return list(zip(final_grads, var_list))
DPOptimizerClass.__doc__ = ('Vectorized DP subclass of {} using Gaussian '
'averaging.').format(cls.__name__)
DPOptimizerClass.__doc__ = (
'Vectorized DP subclass of `tf.compat.v1.train.{}` using '
'Gaussian averaging.').format(cls.__name__)
return DPOptimizerClass