keras prediction output's decimal point without scientifc notation?

感情迁移 提交于 2021-01-05 09:19:31

问题


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?

The results of my current model are array([[6.527474e-05, 5.269228e-05, 9.998820e-01]], dtype=float32)

I want my model output -

(9.998820e-01) -> 0.9998820


回答1:


Both are actually the same. (9.998820e-01) and 0.9998820

you can enable this option, to display the numbers without scientific notation while you print the numpy arrays.

np.set_printoptions(suppress=True)


来源:https://stackoverflow.com/questions/57264251/keras-prediction-outputs-decimal-point-without-scientifc-notation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!