Welcome to our Support Center

explicit padding

explicit paddingΒ : array, specifies the number of pixels to pad at the beginning and end of each spatial axis. Batch and channel axes are not padded. Only used when padding = EXPLICIT.

Format

[x1_begin, x2_begin, …, x1_end, x2_end, …]
Where xi_begin and xi_end are the number of pixels added before and after spatial dimension i.

 

Examples

if 3D input (shape: N x C x H)
Padding 1 pixel at the beginning and 2 at the end of the height axis : explicit_padding = [1, 2]

if 4D input (shape: N x C x H x W)
Padding 1 at the beginning and 2 at the end of height, and 3 at the beginning and 4 at the end of width : explicit_padding = [1, 3, 2, 4]

if 5D input (shape: N x C x D x H x W)
Padding 1 at the beginning and 2 at the end of depth, 3/4 for height, and 5/6 for width : explicit_padding = [1, 3, 5, 2, 4, 6]
The length of explicit_padding must always be 2 Γ— number of spatial dimensions.

 

 

Table of Contents