Skip to Content
Mastering Computer Vision with TensorFlow 2.x
book

Mastering Computer Vision with TensorFlow 2.x

by Krishnendu Kar
May 2020
Beginner to intermediate
430 pages
10h 39m
English
Packt Publishing
Content preview from Mastering Computer Vision with TensorFlow 2.x

Padding

Padding is used to preserve the size of the feature map. With convolution, two issues can occur, and padding addresses both:

  • The feature map's size shrinks with each convolution operation. For example, in the preceding diagram, a 7 x 7 feature map shrinks down to 5 x 5 due to convolution.
  • Information at the edge is lost as the pixel on the edge is altered only once, whereas the pixel in the middle is altered many times by many convolution operations.

The following diagram shows a padding operation of size 1 being used on a 7 x 7 input image:

Note how padding conserves the dimension so that the output is the same size as the input. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Computer Vision with TensorFlow 2

Hands-On Computer Vision with TensorFlow 2

Benjamin Planche, Eliot Andres

Publisher Resources

ISBN: 9781838827069Supplemental Content