Open ziofil opened 3 years ago
TF tensors are supposed to be immutable
Hi @ziofil !
We see that the issue template has not been filled, could you please do so as it helps us analyse the issue .Thanks
TF tensors are supposed to be immutable
I know, but then again there are methods like tf.tensor_scatter_nd_update
, so effectively tensor are mutable if one uses the right methods. So why not allowing a clearer syntax?
Hi @ziofil ! We see that the issue template has not been filled, could you please do so as it helps us analyse the issue .Thanks
Done.
Hi @ziofil , Got workaround on above operation using .numpy() and convert_to_tensor() method.
import tensorflow as tf
import numpy as np
t1 = tf.constant(np.zeros((2, 4)))
t2 = tf.constant(np.ones((2, 3)))
t1 = t1.numpy()
t2 = t2.numpy()
t1[:, 1:4] += t2
print(t1)
print("tensor_format")
t3=tf.convert_to_tensor(t1)
print(t3)
t1[:, [3, 1, 1]] += t2
print(t1)
print("tensor_format")
t3=tf.convert_to_tensor(t1)
print(t3)
Please find the gist for reference
Thanks for the idea, but this is not differentiable...
Hi @sanatmpa1 ,Could you please look into this issue!
An RFC tp address this has been up for a bit. Adding a link here in case anyone wants to provide input.
Comments are invited to the pull request. You can view the design doc here, and also leave comments inline on the document source.
Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.
System information
Describe the feature and the current behavior/state. I would love to be able to do something like the following:
without having to use methods like
tensor_scatter_nd_update
over multiple lines of code...Will this change the current api? How? yes, it will be possible to use a syntax like in numpy, that everyone is familiar with.
Who will benefit with this feature? everyone who needs to build tensors manually