TypeError: 'RefVariable' object does not support item assignment解决方案
使用tf.assign来代替直接使用“=”,举例:import tensorflow as tfimport numpy as npa = tf.placeholder(tf.float32, shape=[2,2])b = tf.Variable(tf.zeros(shape=[1, 1]))sess = tf.Session()b[0,0] = a[0,0]sess.run(t...
原创
2020-04-14 21:06:48 ·
3342 阅读 ·
0 评论