TypeError: ‘Tensor‘ object does not support item assignment in TensorFlow
a = tf.zeros([3,3])a[:,0:2] = 1TypeError: 'Tensor' object does not support item assignment in TensorFlow报错原因是Tensor不能直接赋值,解决办法。1. 使用变量Tensor来处理可以改成:a = tf.Variable(tf.zeros([3,3]))a[:,0:2].assign(1)2.使用numpy来处理b_list = []b_list.append(.