TensorFlow中max pooling层各参数的意义
官方教程中没有解释pooling层各参数的意义,找了很久终于找到,在tensorflow/python/ops/gen_nn_ops.py中有写:
def _max_pool(input, ksize, strides, padding, name=None):
r"""Performs max pooling on the input. Args:
input: A `Tensor` of type `float32`. 4-D input to pool over.
ksize: A list of `ints` that has length `>= 4`.
The size of the window for each dimension of the input tensor.
strides: A list of `ints` that has length `>= 4`.
The stride of the sliding window for each dimension of the
input tensor.
padding: A `string` from: `"SAME", "VALID"`.
The type of padding algorithm to use.
name: A name for the operation (optional). Returns:
A `Tensor` of type `float32`. The max pooled output tensor.
"""
return _op_def_lib.apply_op("MaxPool", input=input, ksize=ksize,
strides=strides, padding=padding, name=name)
padding有两个参数,分别是‘SAME’和'VALID':
1.SAME:pool后进行填充,使输出图片的大小与输入时相同
2.VALID:不进行填充
参考:
1.http://stackoverflow.com/questions/35298823/how-to-write-a-custom-pooling-layer-module-in-tensor-flow/35303470#35303470
2.https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/core/util/padding.h
TensorFlow中max pooling层各参数的意义的更多相关文章
- caffe与tensorflow中的pooling
两个框架对poolin的处理方式不同,这就导致在转模型时容易踩雷 tensorflow通过“VALID”和“SAME”参数来控制 caffe 通过pad值来控制 参考:https://blog.csd ...
- (原)tensorflow中finetune某些层
转载请注明处处: http://www.cnblogs.com/darkknightzh/p/7608709.html 参考网址: https://kratzert.github.io/2017/02 ...
- java web项目中后台控制层对参数进行自定义验证 类 Pattern
Pattern pattern = Pattern.compile("/^([1-9]\d+元*|[0]{0,1})$/");//将给定的正则表达式编译到模式中 if(!" ...
- caffe中全卷积层和全连接层训练参数如何确定
今天来仔细讲一下卷基层和全连接层训练参数个数如何确定的问题.我们以Mnist为例,首先贴出网络配置文件: name: "LeNet" layer { name: "mni ...
- 深度学习中卷积层和pooling层的输出计算公式(转)
原文链接:https://blog.csdn.net/yepeng_xinxian/article/details/82380707 1.卷积层的输出计算公式class torch.nn.Conv2d ...
- (原)torch中微调某层参数
转载请注明出处: http://www.cnblogs.com/darkknightzh/p/6221664.html 参考网址: https://github.com/torch/nn/issues ...
- Tensorflow训练和预测中的BN层的坑
以前使用Caffe的时候没注意这个,现在使用预训练模型来动手做时遇到了.在slim中的自带模型中inception, resnet, mobilenet等都自带BN层,这个坑在<实战Google ...
- tensorflow CNN 卷积神经网络中的卷积层和池化层的代码和效果图
tensorflow CNN 卷积神经网络中的卷积层和池化层的代码和效果图 因为很多 demo 都比较复杂,专门抽出这两个函数,写的 demo. 更多教程:http://www.tensorflown ...
- tensorflow中slim模块api介绍
tensorflow中slim模块api介绍 翻译 2017年08月29日 20:13:35 http://blog.csdn.net/guvcolie/article/details/77686 ...
随机推荐
- iOS8: Ignore manifest download, already have bundleID
在企业分发的app下载过程中,iOS8发现挂在官网上的企业版的app点击了提示是否安装应用程序,但始终安装不上程序,的device console发现安装的时候出现 LoadExternalDownl ...
- awk(1)-简述
1.概述 AWK is a programming language designed for text processing and typically used as a data extract ...
- 带head的gridview
这是github上的一个项目,根据谷歌的那个HeadGridView改的,因为谷歌的那个addHeadView后宽度不能填充屏幕,下面是代码. 来源:https://github.com/liaohu ...
- Lae程序员小漫画(三),仅供一乐
Lae软件开发,快乐程序员!
- Android Studio Eclipse Code Formatter
在从Eclipse转到Android Studio上开发后,如果还想继续使用在Eclipse上制定的自定义的Code Formatter的话,需要按如下步骤操作:1.进入Settings界面,如果能看 ...
- 关于<head></head>标签;<form></form>标签
<head> <title>此处写标题</title> 这是唯一能被用户看到的标记 <meta/>标签: 1.设置字符集:<meta http-e ...
- 新建STM32工程
1) 2)保存 3)选择公司和芯片的型号,STM32F103C8T6,64kB Flash, 20kB SRAM. 4)手动添加启动代码 5)新建如下文件夹 6)回到工程,选中target,右键Add ...
- jstl 标签库的使用
JSTL 核心标签库 使用 JSTL 核心标签库标签共有13个,功能上分为4类: 1.表达式控制标签:out.set.remove.catch 2.流程控制标签:if.choose.when.ot ...
- iOS 传值 委托(delegate)和block 对比
技术交流新QQ群:414971585 这篇文章建议和前一篇一起看, 另外先弄清楚IOS的block是神马东东. 委托和block是IOS上实现回调的两种机制.Block基本可以代替委托的功能,而且实 ...
- ListView的item里面控件文本颜色修改
@SuppressLint("InflateParams") @Override public View getChildView(int groupPosition, int c ...