我有一個索貝爾濾波器如何在tensorflow中播放第三維?
sobel_x = tf.constant([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]], tf.float32)
我想要得到的64中深度的形狀是暫時[3,3,1],但應引起[3,3,64]。
這怎麼辦?隨着下面的行,我得到形狀錯誤。
tf.tile(sobel_x, [1, 1, 64])
ValueError: Shape must be rank 2 but is rank 3 for 'Tile' (op: 'Tile') with input shapes: [3,3], [3].