We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running the code below:
Tensor x = tf.Variable(tf.ones((2, 2))); Console.WriteLine(x); // https://stackoverflow.com/a/43139565/9920172 x["0", "0"].assign(tf.constant(2)); Console.WriteLine(x); Tensor y = x["0", "0"].assign(tf.constant(2)); Console.WriteLine(y);
An error occurs:
An unhandled exception of type 'System.ArgumentException' occurred in TensorFlow.NET.dll: 'Dimensions { and { are not compatible'
This operation is mentioned in Tensorflow official documentation. Here is the link: https://www.tensorflow.org/api_docs/python/tf/Variable#__getitem__.
import tensorflow as tf A = tf.Variable([[1,2,3], [4,5,6], [7,8,9]], dtype=tf.float32) with tf.compat.v1.Session() as sess: sess.run(tf.compat.v1.global_variables_initializer()) print(sess.run(A[:2, :2])) # => [[1,2], [4,5]] op = A[:2,:2].assign(22. * tf.ones((2, 2))) print(sess.run(op)) # => [[22, 22, 3], [22, 22, 6], [7,8,9]]
The text was updated successfully, but these errors were encountered:
Add test case for Tensor.assign SciSharp#653
2ce39c1
The test case is currently not passed yet.
Add test case for Tensor.assign #653
6f8beab
fix Variable[slice].assign() #653
d75366c
Oceania2018
Banyc
No branches or pull requests
Issue
When running the code below:
An error occurs:
In Addition
This operation is mentioned in Tensorflow official documentation. Here is the link: https://www.tensorflow.org/api_docs/python/tf/Variable#__getitem__.
The text was updated successfully, but these errors were encountered: