I am training a keras sequential model and now wish to predict a value. I run the following single line
agent.model.predict(np.array([0,0,0,0]).reshape(1,4))
and get the following output displayed in my notebook
1/1 [==============================] - 0s 29ms/step
array([[0.00760011, 0.01811639]], dtype=float32)
How do I stop Keras from showing the first line in the output?
As mentioned by Gerry P, to prevent Keras from printing the output of model.predict(), set the verbose argument to 0 as follows:
agent.model.predict(np.array([0,0,0,0]).reshape(1,4),verbose = 0)
Reference: Keras documentarion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With