TensorFlow中max pooling层各参数的意义
2016-02-20 17:51
375 查看
官方教程中没有解释pooling层各参数的意义,找了很久终于找到,在tensorflow/python/ops/gen_nn_ops.py中有写:
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
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
相关文章推荐
- 关于$.ajaxFileUpload()上传图片
- 冒泡排序
- vi编辑器
- Freemarker输出$和html标签等特殊符号
- tableView学习
- 行情术语
- 第7章 Android动画深入浅析
- 299. Bulls and Cows
- 命名空间“System.Web.Mvc”中不存在类型或命名空间名称“Ajax”(是否缺少程序集引用?)
- android变色状态栏
- leetcode319 Bulb Switcher
- Largest Rectangle in a Histogram(最大矩形面积,动态规划思想)
- swift2.0笔记3
- FreeMarker模板文件基本语法
- 获取本地文件的大小
- less初学2:嵌套规则,@arguments,避免编译,!important
- less初学2:嵌套规则,@arguments,避免编译,!important
- ubuntu常见错误--Could not get lock /var/lib/dpkg/lock解决
- List之Vector源码分析
- Django - Ajax分页