I have a 3d numpy array having shape of (2, 128, 128)
and I want to add zeros to it so that it becomes (2, 162, 162)
.
I have this below code for padding 2d array
input = tf.constant([[1, 2], [3, 4]])
padding = tf.constant([[2, 2], [2, 2]])
# Printing the Input
print("Input: ", input)
print("Padding: ", padding)
# Generating padded Tensor
res = tf.pad(input, padding, mode ='CONSTANT')
But I want to know padding 3d array by adding zeros.