tf.transpose(input, [dimension_1, dimenaion_2,..,dimension_n])
交换输入张量的维度
二维
A = np.array([[1,2,3],[4,5,6]])
x = tf.transpose(A, [1,0])
三维
B = np.array([[[1,2,3],[4,5,6]]])
y = tf.transpose(B, [2,1,0])
tf.transpose(input, [dimension_1, dimenaion_2,..,dimension_n])
交换输入张量的维度
A = np.array([[1,2,3],[4,5,6]])
x = tf.transpose(A, [1,0])
B = np.array([[[1,2,3],[4,5,6]]])
y = tf.transpose(B, [2,1,0])