1. 问题
AttributeError: module ‘tensorflow.io’ has no attribute gfile'
2. 原因
tensorflow和tensorboard版本对应有问题
3. 解决方案
import tensorflow as tf import tensorboard as tb tf.io.gfile = tb.compat.tensorflow_stub.io.gfile
感谢:
参考链接

1. 问题
AttributeError: module ‘tensorflow.io’ has no attribute gfile'
2. 原因
tensorflow和tensorboard版本对应有问题
3. 解决方案
import tensorflow as tf import tensorboard as tb tf.io.gfile = tb.compat.tensorflow_stub.io.gfile
感谢:
参考链接