module ‘tensorflow‘ has no attribute ‘io‘

目录

module 'tensorflow' has no attribute 'io'解决:

SummaryWriter报错解决方法


module 'tensorflow' has no attribute 'io'

from tensorboard.compat import tensorflow_stub as tf

module 'tensorflow' has no attribute 'io'解决:

from tensorboard.compat import tensorflow_stub as tf

if "tensorflow" in sys.modules :
    print('sd')

_HAS_GFILE_JOIN = hasattr(tf.io.gfile, "join")

SummaryWriter报错解决方法

from torch.utils.tensorboard import SummaryWriter

修改为:

from tensorboardX import SummaryWriter,

猜你喜欢

转载自blog.csdn.net/jacke121/article/details/135416646