美文网首页深入理解tensorflowTensorFlow
TensorFlow版本更新后运行代码所遇到的error(持续更

TensorFlow版本更新后运行代码所遇到的error(持续更

作者: 双愚 | 来源:发表于2017-10-25 17:18 被阅读8次

    本博客会持续更新,如果遇到新的问题,欢迎大家提问,大家一起进步!

    AttributeError: module 'tensorflow' has no attribute 'mul'

    image.png
    • 原因:TensorFlow 发布的新版本的 API 修改了
      tf.mul, tf.sub and tf.neg are deprecated in favor of tf.multiply, tf.subtract and tf.negative.
    • 解决方法:使用时将 tf.mul 改成 tf.multiply 即可
      其余的 tf.sub 和 tf.neg 也要相应修改为 tf.subtract 和 tf.negative。

    相關學習:
    Tensorflow 1.3版本更新概览
    windows tensorflow 版本与升级


    好看的人儿,点个喜欢❤ 你会更好看哦~~

    相关文章

      网友评论

        本文标题:TensorFlow版本更新后运行代码所遇到的error(持续更

        本文链接:https://www.haomeiwen.com/subject/yntcpxtx.html