最近使用Tensorflow 1.15版本跑老版本的代码时,报错如下:
TypeError: `default_name` type (<type 'list'>) is not a string type.
经过查找,git issues解决方案是:
Using the TensorFlow documentation for tf.name_scope, I resolved the issue by prepending [x] with values=. That is change with tf.name_scope(“Encoder_resnet”, [x]): to with tf.name_scope(“Encoder_resnet”, values=[x]):. This error also occurs in a few places over in batch_lbs.py which I fixed in the same way.
就是多加一个 values= 就可以了