windows で動かす tensorflow
TRANSCRIPT
![Page 1: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/1.jpg)
Windows で動かす TensorFlowTakeshi ʹosokenʹ Osoekawa
2015/12/11 @ TensorFlow研究会
![Page 2: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/2.jpg)
自己紹介
小副川 健 [おそえかわ たけし]
仕事: 専門: 計算代数学/計算科学
プログラミング言語: Python, JavaScript, R, C/C++, HTML/CSS...
データ分析
![Page 3: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/3.jpg)
目次Docker で動かす
ネイティブまでの道のり
まとめ
![Page 4: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/4.jpg)
Windows はサポート外Wheel ファイルがない (pip install できない)bazel の Windows サポートがまだ (.whl 作れない)
現状、Docker 経由で動かすのが圧倒的に楽。
![Page 5: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/5.jpg)
Docker Toolbox
![Page 6: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/6.jpg)
Docker を動かすまで1. 仮想化を有効化
2. Docker Toolbox をインストール
3. Docker Quickstart Terminal を起動
![Page 7: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/7.jpg)
仮想化を有効化msinfo32.exe でチェックする
Hyper-V関連が全部「はい」ならOKHyper-Vは無効化しておく
![Page 8: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/8.jpg)
仮想化を有効化BIOS で[Advanced]-[CPU Configuration]の以下を
[Enabled]
Execute Disable Bit
Intel(R) VirtualizationTechnology
(上記は Intel 系の場合: AMD 系はSVMらしいです)
![Page 9: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/9.jpg)
Docker Toolbox をインストール実際は以下の4つがインストールされます
Docker Client for WindowsDocker Toolbox management tool and ISOOracle VM VirtualBoxGit MSYS‑git UNIX tools
![Page 10: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/10.jpg)
Docker Quickstart Terminal を起動
![Page 11: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/11.jpg)
Docker でインストール$ docker run it b.gcr.io/tensorflow/tensorflow
root@xxxxxxxxxxxx:~# python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow as tf >>> sess = tf.Session() >>> a = tf.constant(10) >>> b = tf.constant(32) >>> print(sess.run(a + b)) 42
![Page 12: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/12.jpg)
ネイティブまでの道のりBazel は現状 Windows サポートなし
(一応MSYS2でビルドできるらしい)
2016‑02 にはビルドできるようになるかも。
![Page 13: Windows で動かす TensorFlow](https://reader031.vdocuments.mx/reader031/viewer/2022021919/587199851a28ab044e8b5659/html5/thumbnails/13.jpg)
まとめDocker が楽
来年早々には Bazel でビルドできるようになるかも