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 ...
随机推荐
- win764位Ruby2.0环境搭建之Ruby on Rails
一:安装Ruby 1.在http://rubyinstaller.org 下载需要的ruby版本,因为是exe文件,所以,你可以直接安装. 安装结束后,cmd上运行 ruby -v 显示版本号.如果正 ...
- Wiki语料处理
最近在做知识图谱相关工作,源数据主要来自百度百科,互动百科,中文维基百科等.其中中文维基百科提供数据库下载,下文主要讨论如何处理Wiki数据. 1. 中文维基数据下载 下载dump:https://d ...
- 由于OCR文件损坏造成Oracle RAC不能启动的现象和处理方法
v$cluster_interconnects 集群节点间通信使用的IP地址 错误信息 使用了公网进行连接 SQL> select * from v$cluster_interconnects; ...
- javascript获取浏览器窗口大小
var w=window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var h= ...
- ubuntu12.04静态ip设置问题
由于linux知识不是学的很深,所以仅代表我自己的设置成功总结. 第一步是设置/etc/network/interfaces 增加静态ip设置 auto eth0iface eth0 inet sta ...
- SolidWorks的简单介绍及基本用法
写这博客的动机来源于构建之法微信群里面的的一位老师.sw是一个强大的机械设计制图软件,我记得大一的时候学制图学的3d软件是inventor,而后发现sw用起来更方便更高效,于是就自学了sw,由于是自学 ...
- Ubuntu配置VNC server
安装vncserver后,默认的配置下只有一个很"朴素"的图形界面(没有抓图,就一个黑白窗口),要支持Ubuntu的桌面,并且支持和windows之前复制粘贴文字,需要修改xsta ...
- 深入理解Bindler
Binder模型
- System.DateUtils 1. DateOf、TimeOf 简单修饰功能
编译版本:Delphi XE7 { Simple trimming functions } // 简单修饰功能 function DateOf(const AValue: TDateTime): TD ...
- 关于VS2010无法编译问题
cvtres.exe 近来遇到无法编译问题,编译后debug之类文件全部为空,纠结好久才发现还是一个以前遇到解决过的问题...= = C:\Windows\Microsoft.NET\Framewor ...