diff --git a/tensorflow_privacy/privacy/optimizers/dp_optimizer_vectorized_test.py b/tensorflow_privacy/privacy/optimizers/dp_optimizer_vectorized_test.py index ed209dd..1e6ab9e 100644 --- a/tensorflow_privacy/privacy/optimizers/dp_optimizer_vectorized_test.py +++ b/tensorflow_privacy/privacy/optimizers/dp_optimizer_vectorized_test.py @@ -132,7 +132,8 @@ class DPOptimizerTest(tf.test.TestCase, parameterized.TestCase): def linear_model_fn(features, labels, mode): preds = tf.keras.layers.Dense( - 1, activation='linear', name='dense').apply(features['x']) + 1, activation='linear', name='dense')( + features['x']) vector_loss = tf.math.squared_difference(labels, preds) scalar_loss = tf.reduce_mean(input_tensor=vector_loss) diff --git a/tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/tf_estimator_evaluation_test.py b/tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/tf_estimator_evaluation_test.py index 8d68d22..515ba12 100644 --- a/tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/tf_estimator_evaluation_test.py +++ b/tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/tf_estimator_evaluation_test.py @@ -41,7 +41,7 @@ class UtilsTest(absltest.TestCase): del labels input_layer = tf.reshape(features['x'], [-1, self.ndim]) - logits = tf.keras.layers.Dense(self.nclass).apply(input_layer) + logits = tf.keras.layers.Dense(self.nclass)(input_layer) # Define the PREDICT mode becasue we only need that if mode == tf.estimator.ModeKeys.PREDICT: