檢驗代碼:
import tensorflow as tf a=tf.test.is_built_with_cuda() b=tf.test.is_gpu_available(cuda_only=False,min_cuda_compute_capability=None) print(a) print(b)
執行這段代碼應該顯示為:
檢驗代碼2:
import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello))
安裝成功的正確結果應該為:
驗證環境:
tensorflow-gpu1.15.0