diff --git a/tensorflow_privacy/privacy/optimizers/dp_optimizer.py b/tensorflow_privacy/privacy/optimizers/dp_optimizer.py index fb44361..1458beb 100644 --- a/tensorflow_privacy/privacy/optimizers/dp_optimizer.py +++ b/tensorflow_privacy/privacy/optimizers/dp_optimizer.py @@ -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 diff --git a/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras.py b/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras.py index d5ffe02..c77c36a 100644 --- a/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras.py +++ b/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras.py @@ -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 diff --git a/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras_vectorized.py b/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras_vectorized.py index 5d736b2..0691cf7 100644 --- a/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras_vectorized.py +++ b/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras_vectorized.py @@ -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 diff --git a/tensorflow_privacy/privacy/optimizers/dp_optimizer_vectorized.py b/tensorflow_privacy/privacy/optimizers/dp_optimizer_vectorized.py index 54517ce..142c5f4 100644 --- a/tensorflow_privacy/privacy/optimizers/dp_optimizer_vectorized.py +++ b/tensorflow_privacy/privacy/optimizers/dp_optimizer_vectorized.py @@ -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