Skip to content

Latest commit

 

History

History
28 lines (25 loc) · 484 Bytes

dropout.md

File metadata and controls

28 lines (25 loc) · 484 Bytes

dropout

tf.nn.dropout and tf.layers.dropout

  • tf.nn.dropout

tf.nn.dropout( x, keep_prob, noise_shape=None, seed=None, name=None )

其中需要注意的是keep_prob:保留率

  • tf.layers.dropout
tf.layers.dropout(
    inputs,
    rate=0.5,
    noise_shape=None,
    seed=None,
    training=False,
    name=None
)

关键的参数有俩个:

  1. rate=1-keep_prob;
  2. training为ture时,训练模式;false时为inference mode(预测)