keras预测输出的小数点不带科学计数法? [英] keras prediction output's decimal point without scientifc notation?
本文介绍了keras预测输出的小数点不带科学计数法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通过Keras,我在CNN学习时遇到了一个问题.
Through Keras, I have a question while studying at CNN.
如何将模型的预测计算结果输出到固定的小数点?
How do I output the results from the predictive calculation of the model to the fixed decimal point?
我当前模型的结果是array([[6.527474e-05, 5.269228e-05, 9.998820e-01]], dtype=float32)
我希望我的模型输出-
(9.998820e-01)-> 0.9998820
(9.998820e-01) -> 0.9998820
推荐答案
两者实际上是相同的. (9.998820e-01)和0.9998820
Both are actually the same. (9.998820e-01) and 0.9998820
您可以启用此选项,以在打印numpy数组时显示数字而没有科学计数法.
you can enable this option, to display the numbers without scientific notation while you print the numpy arrays.
np.set_printoptions(suppress=True)
这篇关于keras预测输出的小数点不带科学计数法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文