From f8bb98b10020849bfd3eacad69d65e1a018a7d24 Mon Sep 17 00:00:00 2001 From: XinyueZ Date: Fri, 12 Feb 2021 16:23:31 +0100 Subject: [PATCH] Fix myCallback for Handwriting Recognition/Exercise2-Answer --- .../Exercise2-Answer.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Exercises/Exercise 2 - Handwriting Recognition/Exercise2-Answer.ipynb b/Exercises/Exercise 2 - Handwriting Recognition/Exercise2-Answer.ipynb index 4fac34a1..18e30d48 100644 --- a/Exercises/Exercise 2 - Handwriting Recognition/Exercise2-Answer.ipynb +++ b/Exercises/Exercise 2 - Handwriting Recognition/Exercise2-Answer.ipynb @@ -1,6 +1,6 @@ { "cells": [ - { + { "cell_type": "code", "metadata": { "id": "zX4Kg8DUTKWO", @@ -37,7 +37,7 @@ "\n", "class myCallback(tf.keras.callbacks.Callback):\n", " def on_epoch_end(self, epoch, logs={}):\n", - " if(logs.get('accuracy')>0.99):\n", + " if(logs.get('acc')>0.99):\n", " print(\"\\nReached 99% accuracy so cancelling training!\")\n", " self.model.stop_training = True\n", "\n", @@ -76,4 +76,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file