参考: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. docker常用命令理解

    docker help Commands: attach Attach local standard input, output, and error streams to a running con ...

  2. centos7安装个人博客wordpress

    第一步: 安装apache web 第二步: 安装MariaDB数据库 第三步: 安装PHP 第四步: 安装phpMyAdmin 第五部: 创建数据库: 第六部: 下载wordpress 第七部:复制 ...

  3. linux基础常用语句--新手

    查询:ls查看全部内容:ls -n删除:rm -rf 文件名创建目录: mkdir解压:rpm -验证是否安装:rpm -p 文件名rpm -ivh --nodeps 不需要前置条件的安装查询当前路径 ...

  4. Python判断字符串是否全是字母或数字

    str.isnumeric(): True if 只包含数字:otherwise False.注意:此函数只能用于unicode string str.isdigit(): True if 只包含数字 ...

  5. node-sass 安装失败

    安装 npm install 时偶尔遇到报错:没有安装python或node-sass 安装失败的问题,百度之后发现是被墙了,但根据百度的方法换了淘宝镜像和用了vpn都安装失败, 原因可能是没有卸载之 ...

  6. 【Codeforces 1073D】Berland Fair

    [链接] 我是链接,点我呀:) [题意] 题意 [题解] 我们可以从左到右枚举一轮. 定义一个cost表示这一轮花费的钱数 如果cost+a[i]<=T那么就可以买它,并且买下它(模拟题目要求) ...

  7. nyoj 55 懒省事的小明(priority_queue优先队列)

    懒省事的小明 时间限制:3000 ms  |  内存限制:65535 KB 难度:3   描述       小明很想吃果子,正好果园果子熟了.在果园里,小明已经将所有的果子打了下来,而且按果子的不同种 ...

  8. nyoj 4 ASCII码排序(set,multiset)

    ASCII码排序 时间限制:3000 ms  |  内存限制:65535 KB 难度:2   描述 输入三个字符(可以重复)后,按各字符的ASCII码从小到大的顺序输出这三个字符.   输入 第一行输 ...

  9. MySql 执行计划解读

    说明 解读执行计划l对于我们日常工作中慢sql的分析和调优有很大帮助,同时在解读的过程中也能知道如何规避慢sql 建议需要了解join匹配原理的知识:https://www.cnblogs.com/L ...

  10. MyBatis3-缓存使用

    一级缓存和二级缓存的区别: 1.一级缓存:基于PerpetualCache的HashMap本地缓存,其存储作用域为同一个SqlSession,当Session flush或close之后,该Sessi ...