最佳答案
我已经在我的ubuntu 16.04中使用第二个答案在这里和ubuntu内置的apt cuda安装了tensorflow。
现在我的问题是,我如何测试tensorflow是否真的使用gpu?我有一个gtx 960m gpu。当我import tensorflow
时,这是输出
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally
这个输出是否足够检查tensorflow是否使用gpu ?