【问题标题】:KERAS-Instructions for updating: Colocations handled automatically by placerKERAS-Instructions for updates: 由 placer 自动处理的托管
【发布时间】:2019-11-09 01:15:19
【问题描述】:

我正在使用 Keras 库解决我的神经网络错误。在使用 Dropout 时,我收到了以下 3 个警告

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

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

WARNING:tensorflow: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.cast instead.

这是我如何在模型中使用 dropout

model.add(Dropout(rate=0.2))

虽然这是一个警告,但我很担心。以前,当我使用 dropout 时,我收到了另一个警告,如下所示

model.add(Dropout(0.2))

我应该怎么做才能消除这些警告?谁能帮帮我

【问题讨论】:

    标签: python-3.x keras neural-network deep-learning tf.keras


    【解决方案1】:

    您无法真正摆脱这些警告,它们不是从您的代码生成的,而是从调用 tf.nn.dropout 的内部 keras 代码生成的。这些警告不是针对您的,而是针对 keras 团队的,他们必须更新 tensorflow 后端以删除警告。

    摆脱警告的唯一方法是编辑 keras 的源代码。

    【讨论】:

      猜你喜欢
      • 2017-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-12
      • 2011-05-21
      • 1970-01-01
      • 2014-07-09
      • 2011-02-20
      相关资源
      最近更新 更多