Guest User

Untitled

a guest
May 28th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. my_list = [0.3, 0.5, 0.79, 0.2, 0.11]
  2. m = max(my_list)
  3.  
  4. [0 if i != m else i for i in my_list]
  5.  
  6. [0, 0, 0.79, 0, 0]
  7.  
  8. a_max = tf.where(tf.equal(a, tf.reduce_max(a)), a, tf.zeros_like(a))
Add Comment
Please, Sign In to add comment