1.flags
raise AttributeError(name)
AttributeError: _parse_flags
解决办法:将其FLAGS._parse_flags()换为FLAGS.flag_values_dict()
2.tf.concat()
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
self.h_pool = tf.concat(3, pooled_outputs)改为self.h_pool = tf.concat(pooled_outputs,3)33
3.format
print("{}: step {}, loss {:g}, entropy_loss {:.4f}, l2_loss {:g}, acc {:g}".format(time_str, step, loss, entro_loss, l2_loss, accuracy))
TypeError: unsupported format string passed to numpy.ndarray.__format__
说明传的不是一个数,而是一个数组.