在運行import tensorflow as tf時出現:
經過檢查認爲是tensorflow庫安裝出現問題,卸載tensorflow庫重新安裝
重新安裝tensorflow後,運行出現:AttributeError: module ‘tensorflow.python.training.checkpointable’
查閱資料,大多認爲原因是:
升級或者安裝 tensorflow 時,沒有將老版本卸乾淨。
需要確保:import tensorflow 失敗
然後再重新安裝 tensorflow
然而卸載重裝後沒有解決
後面認爲是由於版本問題導致,採用下面安裝命令解決:
pip install tensorflow-gpu==1.2.1 -i https://pypi.tuna.tsinghua.edu.cn/simple