From 893b615d72cbc9a94116dce04c2bf3967435bc98 Mon Sep 17 00:00:00 2001 From: Liwei Song Date: Fri, 23 Oct 2020 08:58:49 -0400 Subject: [PATCH] use logical AND --- .../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 4e1acf3..9f58740 100644 --- a/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py +++ b/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py @@ -119,7 +119,7 @@ class AttackType(enum.Enum): @property def is_trained_attack(self): """Returns whether this type of attack requires training a model.""" - return (self != AttackType.THRESHOLD_ATTACK) & (self != AttackType.THRESHOLD_ENTROPY_ATTACK) + return (self != AttackType.THRESHOLD_ATTACK) and (self != AttackType.THRESHOLD_ENTROPY_ATTACK) def __str__(self): """Returns LOGISTIC_REGRESSION instead of AttackType.LOGISTIC_REGRESSION."""