AI测试 TensorFlow 学习记录 (五:警告处理)

膨化先生 · September 26, 2019 · 4775 hits

一、keep_prob 参数

1、提示信息

WARNING::tensorflow:From
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.

2、解决

tf.nn.dropout(conv1, keep_prob)
更改为
tf.nn.dropout(conv2, rate = 1-keep_prob)

3、参考

https://blog.csdn.net/xuan9719/article/details/99643315

二、colocate_with方法

1、提示信息

WARNING:tensorflow:From
colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.

2、解决

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
No Reply at the moment.
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up