Last active
September 29, 2016 00:16
-
-
Save yaroslavvb/eb91fe4b221c6b365f927c56f8827448 to your computer and use it in GitHub Desktop.
Example of adding a vector to first row of matrix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = tf.constant([[1,2],[3,4]]) | |
row_to_add = tf.constant([[1, 1]]) | |
updated_row = a[0]+row_to_add | |
updated_a = tf.concat(0, [updated_row, a[1:]]) | |
sess.run(updated_a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment