From 59bccb3a8260df273162bede10b09e3a7387d68a Mon Sep 17 00:00:00 2001 From: Liwei Song Date: Wed, 16 Dec 2020 16:01:29 -0500 Subject: [PATCH] update privacy risk score code --- .../privacy/membership_inference_attack/data_structures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py b/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py index cc1557f..8d83582 100644 --- a/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py +++ b/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py @@ -471,7 +471,7 @@ class SingleRiskScoreResult: precision_list = [] recall_list = [] meaningful_threshold_list = [] - max_risk_score = max(train_risk_scores.max(), test_risk_scores.max()) + max_risk_score = max(self.train_risk_scores.max(), self.test_risk_scores.max()) for threshold in threshold_list: if threshold <= max_risk_score: idx = np.argwhere(thresholds>=threshold)[-1][0]