Hello!
I have a question while studying CNN through Keras
The result of the prediction calculation for the model is array([[6.527474e-05, 5.269228e-05, 9.998820e-01]], dtype=float32) How do I output the result to a fixed decimal point (0.998820) when it comes to floating point like this?
keras
I think it's not a problem with keras, but a print option problem with numpy array.
https://stackoverflow.com/questions/50771966/how-to-get-numpy-not-to-print-in-scientific-notation
When you print a numpy array, it seems to be the default to represent floating point figures in scientific notation, and you can change the option to np.set_printoptions(suppress=true)
to display them in default floating point notation.
But it's just a difference in how you express the value, so I'm not sure if you should be paying attention to it unless you save it as text and read it again. If you save the result, saving the numpy value itself with a pickle will be more accurate.
© 2025 OneMinuteCode. All rights reserved.