I have an image with the shape of 200x250x3
. I want to add the zero padding on top, left, right, bottom to the image to achieve a target shape of 256x256x3
. How could I do it in tensorflow? I found the function tf.pad, but it needs to compute the padding size, while my task have to compute it automatically
https://www.tensorflow.org/versions/r0.8/api_docs/python/array_ops.html#pad
tf.pad(tensor, paddings, mode='CONSTANT', name=None)