第7章畳み込みニューラルネットワーク
7.3.3. Summary and Discussion7.3.3 まとめと考察
Padding can increase the height and width of the output. This is often used to give the output the same height and width as the input to avoid undesirable shrinkage of the output. Moreover, it ensures that all pixels are used equally frequently. Typically we pick symmetric padding on both sides of the input height and width. In this case we refer to padding. Most commonly we set , in which case we simply state that we choose padding .
英語のヒント
パディングによって、出力の高さと幅を増やせる。これは、出力が望ましくない形で縮まないよう、出力に入力と同じ高さと幅をもたせるのによく使われる。さらに、すべての画素が同じ頻度で使われることを保証する。ふつう、入力の高さと幅の両側に対称なパディングを選ぶ。この場合、パディングと呼ぶ。最もよくあるのはとする場合で、そのときは単にパディングを選ぶと言う。
A similar convention applies to strides. When horizontal stride and vertical stride match, we simply talk about stride . The stride can reduce the resolution of the output, for example reducing the height and width of the output to only of the height and width of the input for . By default, the padding is 0 and the stride is 1.
英語のヒント
似た慣習がストライドにも当てはまる。横のストライドと縦のストライドが一致するときは、単にストライドと言う。ストライドは出力の解像度を下げられる。たとえば、のとき、出力の高さと幅を入力の高さと幅のわずかにする。既定では、パディングは0で、ストライドは1である。
So far all padding that we discussed simply extended images with zeros. This has significant computational benefit since it is trivial to accomplish. Moreover, operators can be engineered to take advantage of this padding implicitly without the need to allocate additional memory. At the same time, it allows CNNs to encode implicit position information within an image, simply by learning where the “whitespace” is. There are many alternatives to zero-padding. Alsallakh et al. (2020) provided an extensive overview of those (albeit without a clear case for when to use nonzero paddings unless artifacts occur).
英語のヒント
ここまで論じたパディングはすべて、単に画像を0で拡張するものだった。これは実現するのがごく簡単なので、計算上の大きな利点がある。さらに、追加のメモリを割り当てる必要なしに、このパディングを暗黙のうちに活用するよう演算子を作り込める。同時に、これによってCNNは、「余白」がどこにあるかを学習するだけで、画像の中の暗黙の位置情報を符号化できる。0でのパディングに代わるものはたくさんある。Alsallakh et al. (2020)は、それらを幅広く概観した(ただし、アーティファクトが生じないかぎり、0でないパディングをいつ使うべきかについては、はっきりした根拠は示していない)。