I get this warning most of the time when i define a model using Keras. It seems to somehow come from tensorflow though:
WARNING:tensorflow:From C:\Users\lenik\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version. Instructions for updating: Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
Is this warning something to worry about? If yes, how do i solve this problem?
This depreciation warning is due to the Dropout layer in tf.keras.layers.Dropout
.
To avoid this warning, you need to clearly specify rate=
in Dropout as: Dropout(rate=0.2)
.
Earlier it was keep_prob
and it is now deprecated to rate
i.e. rate = 1-keep_prob.
For more, you can check out this tensorflow documentation.
Tensorflow is telling you that the argument keep_prob
is deprecated and that it has been replaced by the argument rate
.
Now, to achieve the same behavior you have now and remove the warning, you need to replace every occurrence of the keep_prob
argument with rate
argument, and pass the value 1-keep_prob
.
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