diff --git a/12_custom_models_and_training_with_tensorflow.ipynb b/12_custom_models_and_training_with_tensorflow.ipynb index 887c5c7..3dec28f 100644 --- a/12_custom_models_and_training_with_tensorflow.ipynb +++ b/12_custom_models_and_training_with_tensorflow.ipynb @@ -1803,8 +1803,6 @@ " self.stddev = stddev\n", "\n", " def call(self, X, training=None):\n", - " if training is None:\n", - " training = keras.backend.learning_phase()\n", " if training:\n", " noise = tf.random.normal(tf.shape(X), stddev=self.stddev)\n", " return X + noise\n", @@ -1990,8 +1988,6 @@ "\n", " @tf.function\n", " def call(self, inputs, training=None):\n", - " if training is None:\n", - " training = keras.backend.learning_phase()\n", " Z = inputs\n", " for layer in self.hidden:\n", " Z = layer(Z)\n",