I am total newbie to tensorflow, I am learning from
https://www.tensorflow.org/get_started/get_started
fixW = tf.assign(W, [-1.])
works fine,but
fixb = tf.assign(b, [1.])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/milenko/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/state_ops.py", line 272, in assign
return ref.assign(value)
AttributeError: 'Tensor' object has no attribute 'assign'
One other example
zero_tsr = tf.zeros([1.,2.])
zero_tsr
<tf.Tensor 'zeros:0' shape=(1, 2) dtype=float32>
If I try to change zero_tsr
fixz = tf.assign(zero_tsr, [2.,2.])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/milenko/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/state_ops.py", line 272, in assign
return ref.assign(value)
AttributeError: 'Tensor' object has no attribute 'assign'
Again,the same problem.
I have not changed shell,everything is the same.Why do I have problem here?