Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Pretend x came from somewhere useful.
- x = tf.Variable(0)
- A = tf.Variable([1, 2, 3])
- # Replace the 2 with whatever's in x
- A = tf.scatter_update(A, 1, x)
- # Pretend x came from somewhere useful.
- x = tf.Variable(0)
- A = tf.Variable(np.random.rand(3, 3, 3, 3)
- # What's the equivalent of A[1, 1, 1, 1] = x ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement