Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

PlaidML Kerasでやっていく #TokyoR 73

1,963 views

Published on

Tokyo.R #73のLTスライドです

Published in: Data & Analytics
  • Download or read that Ebooks here ... ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD TH1S BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD TH1S BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

PlaidML Kerasでやっていく #TokyoR 73

  1. 1. PlaidML-Kerasでやっていくin NVIDIA, AMD and INTEL GPU Tokyo.R #73 @siero5335
  2. 2. RでもDeep learning の時代(ちょっと前から?) MXNET: https://mxnet.apache.org/ H20: http://docs.h2o.ai/h2o/latest-stable/h2o-docs/welcome.html TensorFlow: https://tensorflow.rstudio.com/ Keras: https://keras.rstudio.com/
  3. 3. RでもDeep learning の時代(ちょっと前から?) RStudioがパッケージを整備
  4. 4. Kerasでやる: DeepやるならGPUの支援がほしい 普通にやるならNVIDIAのGPU RStudioのKerasはinstall_keras()でPython環境にKerasを 入れてRからたたけるようにしてくれる NVIDIA GPU環境があるならinstall_keras(tensorflow = “gpu”) でGPU支援が受けられる
  5. 5. reticulateがPython3になってくれない “reticulateがPython3になってくれなくて生きるのがつらい” https://notchained.hatenablog.com/entry/2018/10/19/222700 @yutannihilation さん Python or openSSLののバージョンが古いとき “keras-PlaidML インストールチャレンジ” http://d.hatena.ne.jp/dichika/20180625/p1 @dichikaさん Anacondaにしておくとpython3でやれる こだわりが無ければanacondaが多分楽 Warning !!!
  6. 6. Kerasでやる: DeepやるならGPUの支援がほしい 普通にやるならNVIDIAのGPU RStudioのKerasはinstall_keras()でPython環境にKerasを 入れてRからたたけるようにしてくれる NVIDIA GPU環境があるならinstall_keras(tensorflow = “gpu”) でGPU支援が受けられる お試しでやるにはちょっと高い? ラップトップ勢 → eGPU用意する? macOS → eGPUも対応してるのはAMD
  7. 7. PlaidML ? NVIDIA, AMD, IntelのGPUに対応 AppleのMetalなどにも対応 Kerasのバックエンドに使える
  8. 8. PlaidML ? NVIDIA, AMD, IntelのGPUに対応 AppleのMetalなどにも対応 Kerasのバックエンドに使える Kerasの裏で動くフレームワークを変えられる use_backend("theano"), use_backend("cntk"), use_backend(backend = "plaidml")
  9. 9. インストール? Macでも高速に機械学習できるかもしれないPlaidMLを試してみた https://qiita.com/croquette0212/items/cae15761876e1e937a6c mnist_cnn by keras-PlaidML GPU in macOS http://rpubs.com/siero5335/399690 keras-PlaidML インストールチャレンジ http://d.hatena.ne.jp/dichika/20180625/p1 “pip install plaidml-keras”でOK 注: R用Kerasが入ってるpythonにインストールする “plaidml-setup” で計算に使う環境を選ぶ
  10. 10. 使えるの? R notebooks for the code samples of the book "Deep Learning with R” https://github.com/jjallaire/deep-learning-with-r-notebooks ここのコードの前半は動くので取っ掛かりには良さそう。 実戦投入するなら転移学習がうまく動かないとちょっと厳しい?
  11. 11. 使えるの? ↓書き換えでどうにかなったところ PlaidML_Keras_R_layer_output_test_5_4.R https://gist.github.com/siero5335/6889f224015550960ca6a5cf278ea188 PlaidML_Keras_R_layer_output_test_6_1_6_2.R https://gist.github.com/siero5335/263cc8cb1e0710809a33799303800288
  12. 12. 使えるの? その他の動かなかったところやちゃんと動いてるかよくわから ない部分は検証を進めていく必要あり Rstudio Kerasのissuesを追いかけていくと良いかも? https://github.com/rstudio/keras/issues
  13. 13. Tensorflow background (MNIST-CNN [CPU]) https://keras.rstudio.com/articles/examples/mnist_cnn.html
  14. 14. Tensorflow background (MNIST-CNN [CPU]) Test loss: 0.027883 Test accuracy: 0.9909 1 epoch: 1分強
  15. 15. PlaidML background (MNIST-CNN Radeon GPU) https://keras.rstudio.com/articles/examples/mnist_cnn.html
  16. 16. Test loss: 0.02664161 Test accuracy: 0.9913 1 epoch : 15秒前後 性能も変わらない PlaidML background (MNIST-CNN Radeon GPU)
  17. 17. まとめ KerasのバックエンドにPlaid MLをつかうことで、 非NVIDIA GPU勢でもGPU支援を受けてdeepができる (Intel チップセットも試したがうちの環境ではOpenCLだとCPUより遅い上lossがNaNに, metalだと動かなかった) GPUハヤイ R Keras本も最初の取っ掛かりのところまでは動くので、 ひとまず手元PCで入門したい人には良さそう 対応してない部分もあるので公式を追いかけると良さ そう。 Kerasチートシートも https://www.rstudio.com/resources/cheatsheets/

×