Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
(?,28,28,1)サイズのMNISTデータセット画像をパディングしてテンソルフローtf.pad()にする(?,32,32,1)方法は?
(?,28,28,1)
tf.pad()
(?,32,32,1)
それは、どのようにパッドを入れる予定かによって異なります。例では次のようになります。
# 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)