11
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windows版TensorFlowのインストールメモ

Last updated at Posted at 2017-02-20

公式サイトの「Installing TensorFlow on Windows」を参考にしつつ、自分の環境にインストールを行った内容を記録しておきます。

・OS:Windows 7 Professional Service Pack 1 64bit
・GPU:NVIDIA GeForce GTX 650
 →compute capabilityが「3.0」なので、いろいろと危険

#CUDA等のインストール
実はこちらは既にインストール済みであったため、わざわざこのためにインストールしませんでした。
とりあえずインストール済みのモジュールのメモ。
CUDA 8.0
cuDNN 5.1
 ※ログインが必要

#Pythonのインストール
すでに、Python 3.6(32bit版)が入っていたが、Python 3.5(64bit版)ではないとダメだということで、ここからインストールしました。
(3.5(32bit版)、および、3.6(32bit版、64bit版)でエラーになるのは確認済み)

その後、TensorFlowをインストールしようとすると、「Pipが古いよ」といわれるので更新しました。

Python -m pip install --upgrade pip

#TensorFlowのインストール
ようやくTensorFlowのインストールです。
Pipを使用します。

pip3 install --upgrade tensorflow-gpu

GPU版をインストールしました。

#ハマったこと(ハマっていること)
・環境変数「PATH」が長すぎて、CUDA/cuDNNのパスが追加できなかった
 →TensorFlowのimport時にエラーが表示されます

・実行ログが表示される

I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:885] Found device 0 with properties:
name: GeForce GTX 650
major: 3 minor: 0 memoryClockRate (GHz) 1.0585
pciBusID 0000:01:00.0
Total memory: 1.00GiB
Free memory: 190.88MiB

 →未解決
  →そういうもの?

・エラーが表示される(実行はされている)

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "CountExtremelyRandomStats" device_type: "CPU"') for unknown op: CountExtremelyRandomStats
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "FinishedNodes" device_type: "CPU"') for unknown op: FinishedNodes
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "GrowTree" device_type: "CPU"') for unknown op: GrowTree
...

 →未解決(こちらを確認中)
  →CPU版は直っているが、GPU版はまだ?

★その後、pipで持ってくるTensorFlowが最新ではないことが判明
★最新のwhlをここから持ってきて、そのファイルをpipすることで、上記エラー等はなくなる

pip3 install tensorflow-1.0.0-cp35-cp35m-win_amd64.whl

#その他
チュートリアルとか欲しくなるので、GitHubからソース一式持ってきておいた方がよい。

11
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?