tensorflow function笔记: dropout
来源:互联网 发布:新东方网络视频哪里买 编辑:程序博客网 时间:2024/04/26 00:02
Function
tf.nn.dropout(x, keep_prob, noise_shape=None, seed=None, name=None)
With probability keep_prob, outputs the input element scaled up by 1 / keep_prob, otherwise outputs 0. The scaling is so that the expected sum is unchanged.
输入元素有keep_prob 的几率按比例扩大1 / keep_prob 倍,否则输出为0. 比例为 1 / keep_prob 是为了使期望的总和不变。
By default, each element is kept or dropped independently. 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.
默认每个元素被保留或者扔掉是独立的。如果指定 noise_shape, 只有 noise_shape[i] == shape(x)[i] 的维度是独立的。 例如 shape(x) = [k, l, m, n] and noise_shape = [k, 1, 1, n], batch 和 channel 的元素被保留的概率是独立, row 和 column 状态相同。
x_out = tf.nn.dropout(x, 0.5, noise_shape = [k, 1, 1, n]),则对于固定的k和n和任意的l和m, x_out[k, l, m, n]相等。(一组image的tensor的四个维度分别称作 [batch, row, column, channel ] 或者 [batch, height, width, channel] )
Args
x: A tensor.
keep_prob: A scalar Tensor with the same type as x. The probability that each element is kept.
noise_shape: A 1-D Tensor of type int32, representing the shape for randomly generated keep/drop flags.
seed: A Python integer. Used to create random seeds. See tf.set_random_seed for behavior.
name: A name for this operation (optional).
Returns
A Tensor of the same shape of x.
- tensorflow function笔记: dropout
- tensorflow 学习笔记8 dropout
- tensorflow学习笔记(八):dropout
- Tensorflow学习笔记(用哪学哪)tf.nn.dropout
- TensorFlow Dropout
- TensorFlow学习笔记(六):如何理解dropout?
- tensorflow function笔记: tf.tile
- 【Tensorflow】tf.nn.dropout函数
- tensorflow function笔记: tf.nn.conv2d
- Dropout阅读笔记
- PyTorch笔记8-Dropout
- DL_tf-activation function and tf.nn.dropout
- TensorFlow 中 dropout 的使用介绍
- tensorflow分类和dropout解决overfitting
- tensorflow-激活函数及tf.nn.dropout
- tensorflow之dropout解决过拟合问题
- TensorFlow中的Dropout防止过拟合overfiting
- Tensorflow(r1.4)API--tf.nn.dropout
- 记面试中知识疑惑点
- c语言进程池的简单实现
- Android组件----Activity
- 数据库跨越访问
- k-邻近算法学习
- tensorflow function笔记: dropout
- NYOJ-71 独木舟上的旅行(贪心)
- Java EE知识储备(五)
- linux几个常用命令总结
- Python_01
- Android 简单的MVP实例
- hduoj 2019数列有序
- Alluxio增强Spark和MapReduce存储能力
- pat-a1091. Acute Stroke (30)