2019年4月15日 更新

Azure で tensorflow-gpu ~tensorflow-gpu 導入編~

3,564 view お気に入り 0
$ 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
33 件

関連する記事 こんな記事も人気です♪

Python × TensorFlow ② ~TensorFlow を扱う上で必要な知識「定数・変数」~

Python × TensorFlow ② ~TensorFlow を扱う上で必要な知識「定数・変数」~

TensorFlow を扱う上で必要な以下3つの知識のうち「定数と変数」について解説していきたいと思います.
井上 大輝 | 8,888 view
Azure + Tensorflow + Kerasで画像認識

Azure + Tensorflow + Kerasで画像認識

クラウドでGPUを使ったディープラーニングを実行するための環境構築法をまとめました。
山田涼太 | 5,595 view

この記事のキーワード

この記事のキュレーター

井上 大輝 井上 大輝