Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. tf.reset_default_graph()
  2.  
  3. sess=tf.Session()
  4.  
  5. X=tf.placeholder(tf.float32, shape=[3,8])
  6.  
  7. X_1 = tf.reshape(X,[3,2,4])
  8.  
  9. print(X_1)
  10.  
  11. X_tensor = tf.transpose(X_1,[1,2,0])
  12.  
  13. print(X_tensor)
  14.  
  15. Tensor("Reshape:0", shape=(3, 2, 4), dtype=float32)
  16.  
  17. Tensor("transpose:0", shape=(2, 4, 3), dtype=float32)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement