参考:https://stackoverflow.com/questions/37674306/what-is-the-difference-between-same-and-valid-padding-in-tf-nn-max-pool-of-t

If you like ascii art:

  • "VALID" = without padding:

       inputs:         1  2  3  4  5  6  7  8  9  10 11 (12 13)
    |________________| dropped
    |_________________|
  • "SAME" = with zero padding:

                   pad|                                      |pad
    inputs: 0 |1 2 3 4 5 6 7 8 9 10 11 12 13|0 0
    |________________|
    |_________________|
    |________________|

In this example:

  • Input width = 13
  • Filter width = 6
  • Stride = 5

Notes:

  • "VALID" only ever drops the right-most columns (or bottom-most rows).
  • "SAME" tries to pad evenly left and right, but if the amount of columns to be added is odd, it will add the extra column to the right, as is the case in this example (the same logic applies vertically: there may be an extra row of zeros at the bottom).

padding valid same区别——就是是否补齐0的问题的更多相关文章

  1. java 数字补齐0

    String str_f = str.substring(0, 1); int i = (Integer.parseInt(str.substring(1)) + 1); // 数字补齐0 Decim ...

  2. java 数字左补齐0

    NumberFormat nf = NumberFormat.getInstance();        //设置是否使用分组        nf.setGroupingUsed(false);    ...

  3. C# 实现数字字符串左补齐0的两种方法

    ); MessageBox.Show(sss); return; 代码如上,自动补齐前面的0

  4. C#实现数字字符串左补齐0的3种方法

    int n = 3; string s = n.ToString().PadLeft(4, '0'); //0003 s = string.Format("{0:d4}", n); ...

  5. C#实现数字字符串左补齐0的方法

    如下: ; , '); //0003 (推荐) s = string.Format("{0:d4}", n); //0003 再如: ; 方法1:Console.WriteLine ...

  6. struct 对齐和补齐原则

    // 对齐原则:每一成员需对齐为后一成员类型的倍数 // 补齐原则:最终大小补齐为成员类型最大值的倍数 struct A {  int a;     // 4  short b;   // (4) + ...

  7. JS实现联想自动补齐功能

    <!DOCTYPE HTML> <html> <head> <meta charset = "utf-8"> <title&g ...

  8. 个人永久性免费-Excel催化剂功能第22波-Excel文件类型、密码批量修改,补齐PowerQuery短板

    Excel的多工作薄.多工作表批量合并功能,Excel用户很多这方面的使用场景,也促使了各大Excel各大插件们都在此功能上有所开发,体验程度不一,但总体能够满足大多数的应用场景,本人之前也开发个单独 ...

  9. @Validated和@Valid的区别?校验级联属性(内部类)

    每篇一句 NBA里有两大笑话:一是科比没天赋,二是詹姆斯没技术 相关阅读 [小家Java]深入了解数据校验:Java Bean Validation 2.0(JSR303.JSR349.JSR380) ...

随机推荐

  1. 面向对象程序设计--Java语言第一周编程题:分数

    分数 题目内容: 设计一个表示分数的类Fraction.这个类用两个int类型的变量分别表示分子和分母. 这个类的构造函数是: Fraction(int a, int b) 构造一个a/b的分数. 这 ...

  2. Linux kernel-汇编基础

    mov ASSEMABLE C LANGUAGE movl %eax,%edx edx = eax; --->register mode movl $0x123,%edx edx = 0x123 ...

  3. linux运行jar报错

    通过maven打jar包,然后复制到虚拟机上执行nohup java -jar xxx.jar &命令,运行jar文件,这时抛出了异常 com.mysql.jdbc.exceptions.jd ...

  4. 山建校赛B题公式证明

    原题 证明

  5. 【Python实践-9】将字符串转化为浮点型

    利用map和reduce编写一个str2float函数,把字符串'123.456'转换成浮点数123.456. 思路:计算小数位数--->将字符串中的小数点去掉--->字符串转换为整数-- ...

  6. Codeforces 989C - A Mist of Florescence

    传送门:http://codeforces.com/contest/989/problem/C 这是一个构造问题. 构造一张网格,网格中的字符为’A’.’B’.’C’.’D’,并且其连通块的个数分别为 ...

  7. AtCoder Beginner Contest 131 Solution

    前言 这次ABC还是有一点难度的吧. TaskA Security Solution 直接模拟就好了. Code /* mail: mleautomaton@foxmail.com author: M ...

  8. 在此计算机中仅有部分visual studio2010产品已升级到SP1,只有全部升级,产品才能正常运行

    先说废话: 本人机子刚装系统Win10 专业版 1709 开始安装vs2010的时候中途报错了,有一个什么驱动不兼容,被我给关闭了,继续安装完,然后找不到vs的启动快捷方式,开始里面没有,于是我开始修 ...

  9. 通过注解配置Bean(2)

    问:怎么用注解来配置bean与bean之间的引用关系? [组件装配] 1.<context:component-scan> 元素还会自动注册AutowiredAnnotationBeanP ...

  10. ModelMap org.springframework.ui.ModelMap

    ModelMap实现了map接口,可以在其中存放属性,作用域同request,同时可与@SessionAttributes联合使用,把数据放入到session中去, 下面这个示例,我们可以在Model ...