module 'tensorflow._api.v1.train' has no attribute 'SummaryWriter'及网页内容无显示
·
一、方法不对
writer = tf.train.SummaryWriter('log/', sess.graph)
修改为:
writer = tf.summary.FileWriter('logs/', sess.graph)
二、运行命令 tensorboard --logdir='logs/' 后能够正常打开网页但没有显示内容
将路径改为绝对路径
参考:【1】AttributeError: module 'tensorflow.tools.api.generator.api.train' has no attribute 'SummaryWriter'
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)