成功解决AttributeError: module 'tensorflow.contrib.data' has no attribute 'TextLineDataset'
生活随笔
收集整理的這篇文章主要介紹了
成功解决AttributeError: module 'tensorflow.contrib.data' has no attribute 'TextLineDataset'
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
成功解決AttributeError: module 'tensorflow.contrib.data' has no attribute 'TextLineDataset'
?
?
目錄
解決問題
解決思路
解決方法
?
?
解決問題
AttributeError: module 'tensorflow.contrib.data' has no attribute 'TextLineDataset'
?
?
?
解決思路
tensorflow版本問題導致的函數調用有變更。
(1)、tf.data.TextLineDataset():這個函數的輸入是一個文件的列表,輸出是一個dataset。dataset中的每一個元素就對應了文件中的一行。可以使用這個函數來讀入CSV文件。
?
?
?
解決方法
將
舊版本的函數
改為
tf.data.TextLineDataset()
大功告成!哈哈!
?
?
總結
以上是生活随笔為你收集整理的成功解决AttributeError: module 'tensorflow.contrib.data' has no attribute 'TextLineDataset'的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 成功解决Git Bash运行脚本命令下载
- 下一篇: 成功解决TypeError: map()