• tensorflow 版本报错


    TensorFlow报错:AttributeError: module 'tensorflow._api.v1.train' has no attribute 'SummaryWriter'等

    TensorFlow报错:AttributeError: module ‘tensorflow._api.v1.train’ has no attribute 'SummaryWriter’等

    分析:版本更新,方法调用方式改变

    import tensorflow.compat.v1 as tf

    tf.disable_eager_execution()

    解决方式:

    报错原方法更改后方法
    AttributeError: module ‘tensorflow._api.v1.train’ has no attribute ‘SummaryWriter’ tf.train.SummaryWriter() tf.summary.FileWriter()
    AttributeError: module ‘tensorflow’ has no attribute ‘merge_all_summaries’ tf.merge_all_summaries() tf.summary.merge_all()
    AttributeError: module ‘tensorflow’ has no attribute ‘histogram_summary’ tf.histogram_summary() tf.summary.histogram()
    AttributeError: module ‘tensorflow’ has no attribute ‘scalar_summary’ tf.scalar_summary() tf.summary.scalar()
    AttributeError: module ‘tensorflow’ has no attribute ‘image_summary’ tf.image_summary() tf.summary.image()
    AttributeError: module ‘tensorflow’ has no attribute 'audio_summary tf.audio_summary() tf.summary.audio()
    AttributeError: module ‘tensorflow’ has no attribute ‘merge_summary’ tf.merge_summary() tf.summary.merge()
  • 相关阅读:
    大二下-个人课堂总结
    第十六周总结
    第十五周总结
    计算最长英语单词链
    第十四周总结
    大道至简阅读笔记03
    信息反馈—冲刺20
    sudo安装某一文件报错:E: 无法获得锁 /var/lib/dpkg/lock
    linux脚本文件执行的方法之间的区别
    opencv的安装及填坑
  • 原文地址:https://www.cnblogs.com/kuku0223/p/14296263.html
Copyright © 2020-2023  润新知