安裝Tensorflow 2.0以后,運行
import tensorflow as tf
出現下面的錯誤:
原因及解決的辦法:以前是用pip install tensorflow-gpu安裝的,沒有指定版本,刪除以前安裝的版本,指定版本為2.0.0-alpha0安裝:
pip install tensorflow-gpu==2.0.0-alpha0 -i https://pypi.tuna.tsinghua.edu.cn/simple --default-timeout=10000