module ‘tensorflow‘ has no attribute ‘io‘

发布时间:2024年01月05日

目录

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,

文章来源:https://blog.csdn.net/jacke121/article/details/135416646
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。