优化可视化配色

master
li.chengmeng 3 years ago
parent d56568b5d1
commit 99c114d758

@ -25,7 +25,7 @@ model.summary()
model.evaluate(test_images.reshape(-1, 28, 28, 1), test_labels) model.evaluate(test_images.reshape(-1, 28, 28, 1), test_labels)
# 可视化预测效果 # 可视化预测效果
show_num = 300 show_num = 170
testShow = test_labels[:show_num] testShow = test_labels[:show_num]
pred = model.predict(test_images.reshape(-1, 28, 28, 1)) pred = model.predict(test_images.reshape(-1, 28, 28, 1))
@ -36,7 +36,7 @@ for item in pred:
plt.figure() plt.figure()
plt.title('Conv Predict') plt.title('Conv Predict')
plt.ylabel('number') plt.ylabel('number')
plt.plot(range(testShow.size), predict[:show_num], label='predict') plt.plot(range(testShow.size), predict[:show_num], marker='^', color='coral',label='predict')
plt.plot(range(testShow.size), testShow, label='result') plt.plot(range(testShow.size), testShow, marker='o',color='deepskyblue',label='result')
plt.legend() plt.legend()
plt.show() plt.show()

Loading…
Cancel
Save