$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.10.1-cp36-cp36m-linux_x86_64.whl
Install tensorflow-gpu
tensorflow-gpu が正しくインストールされていることを確認しましょう.以下のように,CPU と GPU が認識されていれば,tensorflow-gpu のインストールが適切に完了しています.
$ python3 >>> from tensorflow.python.client import device_lib >>> print(device_lib.list_local_devices()) #---- 以下は実行結果です. 2018-09-12 19:09:01.915780: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2018-09-12 19:09:03.354013: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 0 with properties: name: Tesla M60 major: 5 minor: 2 memoryClockRate(GHz): 1.1775 pciBusID: 22b1:00:00.0 totalMemory: 7.94GiB freeMemory: 7.86GiB 2018-09-12 19:09:03.354060: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0 2018-09-12 19:09:03.646371: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix: 2018-09-12 19:09:03.646429: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0 2018-09-12 19:09:03.646452: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0: N 2018-09-12 19:09:03.646661: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/device:GPU:0 with 7580 MB memory) -> physical GPU (device: 0, name: Tesla M60, pci bus id: 22b1:00:00.0, compute capability: 5.2) [name: "/device:CPU:0" device_type: "CPU" memory_limit: 268435456 locality { } incarnation: 10924952114733214568 , name: "/device:GPU:0" device_type: "GPU" memory_limit: 7949005620 locality { bus_id: 1 links { } } incarnation: 8147529738102065137 physical_device_desc: "device: 0, name: Tesla M60, pci bus id: 22b1:00:00.0, compute capability: 5.2" ]
ensure that TensorFlow is running by GPU or not by GPU