用tf.pad填充MNIST数据集()
答
这取决于你打算如何填补它。举例如下:
# Assuming input is a tensor with shape (?, 28, 28, 1)
output = tf.pad(input, [[0, 0], [2,2], [2,2], [0,0]])
# print(tf.shape(output)) should be (?, 32, 32, 1)
tf文档的哪个部分对您不清楚? – greeness