普通にSteamで使っていたPCなので、ドライバ等は入っている前提です。
あと、Kerasで学習したモデルは、iOS11CoreMLで使うことを前提にKeras 2.0.4を使用します。
が、Tensorflow 1.0.x, 1.1.xがなかったので 1.2.1 をインストしました。動くのかわかりません...
Environment
- Windows10 64bit
- GTX960 with 4GB
- Driver 381.65
ドライバやSpecは、NVIDIAコントロールパネルのシステム情報から確認できます。
Installation
1. CUDA Toolkit 8.0
https://developer.nvidia.com/cuda-downloads
からインストーラをDL後、ダイアログに従う。
2. cuDNN 5.1
https://developer.nvidia.com/cudnn
からDL後、 cudnn-8.0-windows10-x64-v5.1.zip\cuda\*
を
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0
へコピーする。
tensorflow_self_check
TensorFlow 1.2.1 or earlier requires cuDNN 5.1. ('cudnn64_5.dll')
TensorFlow 1.3 or later requires cuDNN 6. ('cudnn64_6.dll')
3. Visual C++ 2015 Build Tools
※ numpyインストール時にエラーが出て、↓のURLが吐かれました。
http://landinghub.visualstudio.com/visual-cpp-build-tools
からインストールする。
※ Visual Studioが入っている場合は、バッティングしてインストール出来ませんでした。
http://qiita.com/84zume/items/72bed23914c671b61fba
を参考に、Programming Languages -> Visual C++ -> Common Tools for Visual C++ 2015をインストールしました。
4. tensorflow-gpu
> pip install h5py matplotlib "tensorflow-gpu==1.2.1"
kerasのインストールで以下のエラーが出たので、stack overflowで対策する。
...
File "scipy\linalg\setup.py", line 20, in configuration
raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
> pip install .\scipy-0.19.1-cp36-cp36m-win_amd64.whl
> pip install "keras==2.0.4"