美文网首页
解决:tensorflow have no attribute

解决:tensorflow have no attribute

作者: Yuri7 | 来源:发表于2021-01-27 10:11 被阅读0次

    具体写法根据tensorflow的版本而定

    
    # tensorflow >= 1.5
    tf.compat.v1.enable_eager_execution() 
     
    # tensorflow >= 1.4 <2.0
    tf.enable_eager_execution() 
     
    # tensorflow >= 2.0
    以上都免了,也可以使用第一个
    

    相关文章

      网友评论

          本文标题:解决:tensorflow have no attribute

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