Convolutional neural network: Difference between revisions

 
(4 intermediate revisions by the same user not shown)
Line 96: Line 96:


===Stride===
===Stride===
How much the kernel moves. Typically 1 or 2.
How much the kernel moves. Typically 1 or 2
Moving by 2 will yield half the resolution of the input.


===Padding===
===Padding===
Line 104: Line 105:


;Common Types of padding
;Common Types of padding
* Zero/Constant
* Zero or Constant padding
* Mirror/Reflection
* Mirror/Reflection padding
* Replication
* Replication padding


With convolution layers in tensorflow and other libraries you often see these two types of padding:
With convolution layers in libraries you often see these two types of padding which can be added to the conv layer directly:
* <code>VALID</code> - Do not do any padding
* <code>VALID</code> - Do not do any padding
* <code>SAME</code> - Apply zero padding such that the output will have resolution \(\lfloor x/stride \rfloor\).
* <code>SAME</code> - Apply zero padding such that the output will have resolution \(\lfloor x/stride \rfloor\).