Compute the padded size given the desired size and the stride.
tfm.vision.preprocess_ops.compute_padded_size(
desired_size, stride
)
The padded size will be the smallest rectangle, such that each dimension is
the smallest multiple of the stride which is larger than the desired
dimension. For example, if desired_size = (100, 200) and stride = 32,
the output padded_size = (128, 224).
Args |
desired_size
|
a Tensor or int list/tuple of two elements representing
[height, width] of the target output image size.
|
stride
|
an integer, the stride of the backbone network.
|
Returns |
padded_size
|
a Tensor or int list/tuple of two elements representing
[height, width] of the padded output image size.
|