Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. # Pretend x came from somewhere useful.
  2. x = tf.Variable(0)
  3. A = tf.Variable([1, 2, 3])
  4. # Replace the 2 with whatever's in x
  5. A = tf.scatter_update(A, 1, x)
  6.  
  7. # Pretend x came from somewhere useful.
  8. x = tf.Variable(0)
  9. A = tf.Variable(np.random.rand(3, 3, 3, 3)
  10. # What's the equivalent of A[1, 1, 1, 1] = x ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement