WARNING: Logging before flag parsing goes to stderr.
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’.
tf.nn.dropout() 源码如下:
def dropout(x, keep_prob=None, noise_shape=None, seed=None, name=None, rate=None):
'''官方备注节选
Args:
x: A floating point tensor.
keep_prob: (deprecated) A deprecated alias for `(1-rate)`
rate: A scalar `Tensor` with the same type as `x`. The probability that each
element of `x` is discarded.
'''
try:
keep = 1. - keep_prob if keep_prob is not None <