From 3059fbae67498cda61f06e3a2605eb7364b47d26 Mon Sep 17 00:00:00 2001 From: Steve Chien Date: Mon, 30 Aug 2021 16:45:40 -0700 Subject: [PATCH] Fix heterogeneous spellings of "heterogeneous". PiperOrigin-RevId: 393881235 --- tensorflow_privacy/__init__.py | 2 +- tensorflow_privacy/privacy/analysis/rdp_accountant.py | 4 ++-- tensorflow_privacy/privacy/analysis/rdp_accountant_test.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tensorflow_privacy/__init__.py b/tensorflow_privacy/__init__.py index 84839e4..43426b6 100644 --- a/tensorflow_privacy/__init__.py +++ b/tensorflow_privacy/__init__.py @@ -31,7 +31,7 @@ else: # Analysis from tensorflow_privacy.privacy.analysis.compute_dp_sgd_privacy_lib import compute_dp_sgd_privacy - from tensorflow_privacy.privacy.analysis.rdp_accountant import compute_heterogenous_rdp + from tensorflow_privacy.privacy.analysis.rdp_accountant import compute_heterogeneous_rdp from tensorflow_privacy.privacy.analysis.rdp_accountant import compute_rdp from tensorflow_privacy.privacy.analysis.rdp_accountant import get_privacy_spent diff --git a/tensorflow_privacy/privacy/analysis/rdp_accountant.py b/tensorflow_privacy/privacy/analysis/rdp_accountant.py index ef4dcba..c872318 100644 --- a/tensorflow_privacy/privacy/analysis/rdp_accountant.py +++ b/tensorflow_privacy/privacy/analysis/rdp_accountant.py @@ -540,8 +540,8 @@ def _compute_rdp_sample_without_replacement_int(q, sigma, alpha): return log_a -def compute_heterogenous_rdp(sampling_probabilities, noise_multipliers, - steps_list, orders): +def compute_heterogeneous_rdp(sampling_probabilities, noise_multipliers, + steps_list, orders): """Computes RDP of Heteregoneous Applications of Sampled Gaussian Mechanisms. Args: diff --git a/tensorflow_privacy/privacy/analysis/rdp_accountant_test.py b/tensorflow_privacy/privacy/analysis/rdp_accountant_test.py index 5c0353e..3a5529f 100644 --- a/tensorflow_privacy/privacy/analysis/rdp_accountant_test.py +++ b/tensorflow_privacy/privacy/analysis/rdp_accountant_test.py @@ -86,9 +86,9 @@ class TestGaussianMoments(tf.test.TestCase, parameterized.TestCase): steps_list = [1, 1] orders = 20 self.assertEqual( - rdp_accountant.compute_heterogenous_rdp(sampling_probabilities, - noise_multipliers, steps_list, - orders), 0.1) + rdp_accountant.compute_heterogeneous_rdp(sampling_probabilities, + noise_multipliers, steps_list, + orders), 0.1) def test_compute_rdp_no_data(self): # q = 0