tf.ConfigProto() 在创建会话的时候进行参数配置 版本问题,将tf.ConfigProto() 改为 tf.compat.v1.ConfigProto() 类似 tf.*** 的解决办法一般为加 compat.v1.