Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CNN训练.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down