From 70a541343f90e78547c8636998dd124657d74caa Mon Sep 17 00:00:00 2001 From: ByronGe <2450894732@qq.com> Date: Thu, 18 Jan 2018 12:35:32 +0800 Subject: [PATCH] =?UTF-8?q?Update=20CNN=E8=AE=AD=E7=BB=83.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "CNN\350\256\255\347\273\203.py" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/CNN\350\256\255\347\273\203.py" "b/CNN\350\256\255\347\273\203.py" index 278b924..d936fb7 100644 --- "a/CNN\350\256\255\347\273\203.py" +++ "b/CNN\350\256\255\347\273\203.py" @@ -200,7 +200,7 @@ def cnnTrain(): acc = accuracy.eval({x: test_x, y_: test_y, keep_prob_5: 1.0, keep_prob_75: 1.0}) print(n*num_batch+i, acc) # 准确率大于0.98时保存并退出 - if acc > 0.998 and n > 200: + if acc > 0.998 or n > 200: saver.save(sess, 'model/train_faces.model') sys.exit(0) saver.save(sess, 'model/train_faces.model')