View source on GitHub |
Determine correct amount of padding for same
convolution.
tfc.ops.same_padding_for_kernel(
shape, corr, strides_up=None
)
To implement 'same'
convolutions, we first pad the image, and then perform a
'valid'
convolution or correlation. Given the kernel shape, this function
determines the correct amount of padding so that the output of the convolution
or correlation is the same size as the pre-padded input.
Returns | |
---|---|
The amount of padding at the beginning and end for each dimension. |