深度学习中Dropout策略
来源:互联网 发布:阿里云centos7 lamp 编辑:程序博客网 时间:2024/05/22 07:51
在写系统时候遇到一个问题:模仿的版本在测试阶段,把所有权重乘以一个保留概率(做法1)。而GJH他看的Keras里面测试阶段什么都不做(做法2),所以比较好奇,怎么做法不同?
但是随手搜了几个中文博客,都是按做法1来的,训练阶段按保留概率随机生成一个保留矩阵(元素要么0-丢弃,要么1-保留),然后测试阶段所有权重乘以保留概率。
在回头看TensorFlow的Dropout函数https://www.tensorflow.org/api_docs/python/tf/nn/dropout,怎么涉及一个scale操作,懵了:
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.
Google了下,找到类似的疑惑提问:
Why input is scaled in tf.nn.dropout in tensorflow?
http://techqa.info/programming/question/34597316/why-input-is-scaled-in-tf.nn.dropout-in-tensorflow
顺藤摸瓜去扫了一眼Dropout原文:http://www.cs.toronto.edu/~rsalakhu/papers/srivastava14a.pdf,才发现是Dropout的两种策略:
In this paper, we described dropout as a method where we retain units with probability pat training time and scale down the weights by multiplying them by a factor of p at test time.Another way to achieve the same effect is to scale up the retained activations by multiplying by 1/p at training time and not modifying the weights at test time. These methods are equivalent with appropriate scaling of the learning rate and weight initializations at each layer.
简单讲就是:
训练有scale,测试不用管。
训练没scale,测试要乘p。
不过,读了下原文摘要,比那些博客写的好多了... 还是要多看论文啊.....
- 深度学习中Dropout策略
- 关于深度学习中Dropout的理解
- 关于深度学习中Dropout的理解
- 深度学习Deep Learning: dropout策略防止过拟合
- Dropout 深度学习
- 深度学习中Dropout优化的原理分析
- 深度学习中Dropout和Layer Normalization技术的使用
- 【深度学习】Dropout网络笔记
- 深度学习——dropout
- 深度学习(dropout 和 maxout 技术)
- 【深度学习:CNN】Dropout解析(1)
- 【深度学习:CNN】Dropout解析(2)
- 转载:深度学习网络 之Dropout
- 深度学习中的Dropout原理介绍
- 深度学习:正则化(L2、dropout)
- 深度学习总结(十)——dropout
- 深度学习正则化之dropout
- 深度学习理解tensorflow之Dropout
- bzoj1578[Usaco2009 Feb]Stock Market 股票市场 完全背包
- java幂等性的控制(技术论坛上整理成文)
- Android targetSdkVersion的作用
- Select first row in each GROUP BY group?
- 面试遇到的一些基础细节问题
- 深度学习中Dropout策略
- 对一个数进行若干变换直至变成个位数
- 用FileZilla搭建FTP服务器及相关问题
- 与倒数第N个节点相关的题目
- select与shutdown
- 跨站请求伪造CSRF
- 富文本编辑器 CKeditor 的使用
- iOS开发遍历集合(NSArray,NSDictionary、NSSet)方法总结
- 从extends和super浅谈java泛型