码迷,mamicode.com
首页 > 其他好文 > 详细

TF-tf.nn.dropout介绍

时间:2017-05-13 20:05:18      阅读:367      评论:0      收藏:0      [点我收藏+]

标签:默认   ble   style   nbsp   情况   channel   bat   name   cas   

官方的接口是这样的

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

根据给出的keep_prob参数,将输入tensor x按比例输出。

默认情况下, 每个元素保存或丢弃都是独立的。后面这段没太懂,以后懂了再补上: If noise_shape is specified, it must be broadcastable to the shape of x, and only dimensions with noise_shape[i] == shape(x)[i] will make independent decisions. For example, if shape(x) = [k, l, m, n] and noise_shape = [k, 1, 1, n], each batch and channel component will be kept independently and each row and column will be kept or not kept together.

x                 :  输入tensor
keep_prob    :  float类型,每个元素被保留下来的概率
noise_shape  : 一个1维的int32张量,代表了随机产生“保留/丢弃”标志的shape。
seed             : 整形变量,随机数种子。
name            : 名字,没啥用。 

TF-tf.nn.dropout介绍

标签:默认   ble   style   nbsp   情况   channel   bat   name   cas   

原文地址:http://www.cnblogs.com/qggg/p/6849881.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!