I am trying to use tf.pad. Here is my attempt to pad the tensor to length 20, with values 10.
tf.pad(tf.constant([1, 2, 3, 45]), paddings=20, constant_values=10)
I get this error message
InvalidArgumentError: paddings must be a matrix with 2 columns: [2,1] [Op:PadV2]
I am looking at the documentation
https://www.tensorflow.org/api_docs/python/tf/pad
paddings is an integer tensor with shape [n, 2], where n is the rank of tensor. For each dimension D of input, paddings[D, 0] indicates how many values to add before the contents of tensor in that dimension, and paddings[D, 1] indicates how many values to add after the contents of tensor in that dimension
But I am unable to figure out how to shape the pad value