執行nvidia-smi
出錯
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running;
看了網上說需要降低Linux內核版本,但是試了沒用,最后通過改TensorFlow和cuda的版本才把問題解決,然后得出個結論,對於TensorFlow這種多路配合配能用的東西,一定要注意版本間的對應關系,以前不注意這個問題,總喜歡用最新版本的東西,后來栽在這里,浪費了很多時間,果然合適才是最重要的!
我用的版本cuda版本是9.0,cudnn版本自然與之對應,TensorFlow版本是1.8,之后沒有出現這樣的問題,正常運行