zoukankan      html  css  js  c++  java
  • padding valid same区别——就是是否补齐0的问题

    参考: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).
  • 相关阅读:
    (Problem 4)Largest palindrome product
    (Problem 3)Largest prime factor
    (Problem 2)Even Fibonacci numbers
    (Problem 1)Multiples of 3 and 5
    Ural 1086
    Ural 1319
    Ural 1149
    Ural 1079
    Ural 1068
    2016/04/06
  • 原文地址:https://www.cnblogs.com/bonelee/p/8532708.html
Copyright © 2011-2022 走看看