The tensor to pad.
An array of length R
(the rank of the tensor), where
each element is a length-2 tuple of ints [padBefore, padAfter]
,
specifying how much to pad along each dimension of the tensor.
Optional
constantValue: numberThe pad value to use. Defaults to 0.
Pads a
tf.Tensor
with a given value and paddings.This operation implements
CONSTANT
mode. ForREFLECT
andSYMMETRIC
, refer totf.mirrorPad
.Also available are stricter rank-specific methods with the same signature as this method that assert that
paddings
is of given length.tf.pad1d
tf.pad2d
tf.pad3d
tf.pad4d