tensorflow: Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`

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.