tf.pad( tensor, paddings, mode='CONSTANT', name=None, constant_values=0)pad一个张量。...[4, 5, 6]])paddings = tf.constant([[1, 1,], [2, 2]])# 'constant_values' is 0.# rank of 't' is 2.tf.pad...# [0, 0, 4, 5, 6, 0, 0], # [0, 0, 0, 0, 0, 0, 0]]tf.pad...# [6, 5, 4, 5, 6, 5, 4], # [3, 2, 1, 2, 3, 2, 1]]tf.pad...CONSTANT", "REFLECT", or "SYMMETRIC".原链接: https://tensorflow.google.cn/versions/r1.9/api_docs/python/tf/pad