SlideShare a Scribd company logo
1 of 24
Download to read offline
如何讓Keras能在R語言中運作
安裝教學
指導教授:中山財管所 王昭文 教授
整理:中山財管所 研究助理 蘇彥庭
摘要
此份簡報將會講解如何讓TensorFlow及Keras能在R語言中運作。
需要的安裝程式有:
1. Anaconda
2. Rtools
3. CUDA® Toolkit 8.0 (如有需要GPU運算才需要裝)
4. cuDNN v6 (如有需要GPU運算才需要裝)
安裝Anaconda
Anaconda下載網址:
https://www.anaconda.com/download/
Anaconda安裝
直接點選下載檔案即可自動安裝。
1. 2.
3. 4.
Anaconda安裝
此處步驟為重點步驟!!
此選項要記得打勾
Anaconda安裝
1.
2.
下載Rtools
Anaconda下載網址:
https://cran.r-project.org/bin/windows/Rtools/
安裝Rtools
1. 2.
3. 4.
安裝Rtools 此選項要記得打勾
此處步驟為重點步驟!!
安裝Rtools
1. 2.
3. 4.
GPU加速運算安裝
若需要GPU加速運算,需要Nvidia的顯
示卡,並安裝CUDA® Toolkit 8.0及
cuDNN v6,且顯示卡的 CUDA
Compute Capability須高於3分。
若沒有符合上述條件也沒有關係,
Keras也可用CPU去跑,可以跳過此部
份的安裝,直接到「在R程式中
安裝Keras套件」簡報頁繼續往下操作。
查詢GPU的Compute Capability網址:
https://developer.nvidia.com/cuda-gpus/
CUDA® Toolkit 8.0
下載
下載網址:
https://developer.nvidia.com/cuda-
downloads
目前的CUDA版本已經出到9.0版本,
但經實測安裝9.0版本會造成
TensorFlow出錯,所以選擇8.0版安裝。
網頁下拉
CUDA® Toolkit 8.0
下載
點選CUDA Toolkit 8.0 GA1 (Sept 2016)
後下載安裝。
安裝流程步驟以下省略。
CUDA® Toolkit
8.0
安裝
執行安裝檔開始安裝。
按步驟操作,即可完成安裝。
1. 2.
3. 4.
cuDNN v6下載
下載網址:
https://developer.nvidia.com/cudnn
注意:在下載cuDNN v6前,需先安
裝好CUDA。
cuDNN 目前已有第7版,但為配合
TensorFlow要求,此處裝第6版。
cuDNN v6下載
點選download後,NVIDIA會要求要
先登入帳號,如果沒有帳號的話,
就直接辦㇐個。㇐定要有帳號才能
下載。
1.
2.
cuDNN v6下載
登入後,重新輸入網址:
https://developer.nvidia.com/cudnn
回到下載網頁。
1.
2.
重新輸入網址
cuDNN v6下載
點選下載
Download cuDNN v6.0 (April 27,
2017), for CUDA 8.0
cuDNN v6安裝
下載完後為㇐個解壓縮檔案,將解
壓縮檔案內的資料夾cuda打開,裡
面還會有三個資料夾,將這三個資
料夾解壓縮至:
C:Program FilesNVIDIA GPU
Computing ToolkitCUDAv8.0
解壓縮完後,即安裝完成。
點開
在R程式中
安裝Keras套件
按程式碼依序執行
程式碼可至Rstudio教學網站複製:
https://tensorflow.rstudio.com/keras/
測試程式碼
安裝完後輸入建構模型程式碼,若
有輸出模型結構結果,代表安裝成
功。
Keras範例
Rstudio在網站上有放R操作Keras各
種深度學習模型範例,有興趣可以
參考:
https://tensorflow.rstudio.com/keras
/articles/examples/
參考資料
1. TensorFlow for R (安裝說明及R語言使用各種深度學習模型範例)
◦ https://tensorflow.rstudio.com/keras/
2. Installing TensorFlow on Windows (GPU安裝說明可參考此網站)
◦ https://www.tensorflow.org/install/install_windows
3. R 套件 - R 安裝機器學習套件 rtensorflow, Keras (部落格文章,作者中文說明安裝流程)
◦ https://blog.stranity.com.tw/2017/10/12/r-%E5%A5%97%E4%BB%B6-%EF%BC%8D-r-
%E5%AE%89%E8%A3%9D%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92%E5%A5%97
%E4%BB%B6-rtensorflow-keras/
4. R筆記 – (15)Windows安裝深度學習套件:Tensorflow/Keras(R版本)
◦ https://rpubs.com/skydome20/R-Note15-R_tensorflow_keras_install_windows
簡報結束 謝謝大家

More Related Content

Similar to 如何讓Keras能在R語言中運作_安裝教學

互联网创业服务器运维工具集
互联网创业服务器运维工具集互联网创业服务器运维工具集
互联网创业服务器运维工具集zhen chen
 
Hadoop开发者入门专刊
Hadoop开发者入门专刊Hadoop开发者入门专刊
Hadoop开发者入门专刊liangxiao0315
 
Php可调试团队开发环境配置
Php可调试团队开发环境配置Php可调试团队开发环境配置
Php可调试团队开发环境配置wangkangluo1
 
Php可调试团队开发环境配置
Php可调试团队开发环境配置Php可调试团队开发环境配置
Php可调试团队开发环境配置xinqi yang
 
附錄--Anaconda installation
附錄--Anaconda installation附錄--Anaconda installation
附錄--Anaconda installation艾鍗科技
 
自动化运维管理
自动化运维管理自动化运维管理
自动化运维管理frankwsj
 
Phalcon2014 Startup
Phalcon2014 StartupPhalcon2014 Startup
Phalcon2014 StartupSteve Luo
 
Configuration tutorial for pytorch environment under windows.pdf
Configuration tutorial for pytorch environment under windows.pdfConfiguration tutorial for pytorch environment under windows.pdf
Configuration tutorial for pytorch environment under windows.pdfshuaihaohan135
 
2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swttka
 
Full Stack Monitoring with Prometheus and Grafana (Updated)
Full Stack Monitoring with Prometheus and Grafana (Updated)Full Stack Monitoring with Prometheus and Grafana (Updated)
Full Stack Monitoring with Prometheus and Grafana (Updated)Jazz Yao-Tsung Wang
 
docker intro
docker introdocker intro
docker introkoji lin
 
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践maclean liu
 
使用 Vagrant/Docker 打造团队跨平台开发环境
使用 Vagrant/Docker 打造团队跨平台开发环境 使用 Vagrant/Docker 打造团队跨平台开发环境
使用 Vagrant/Docker 打造团队跨平台开发环境 一军 谢
 
Apache安装配置mod security
Apache安装配置mod securityApache安装配置mod security
Apache安装配置mod securityHuang Toby
 
VMware Rhel5 Oracle10g Rac
VMware Rhel5 Oracle10g RacVMware Rhel5 Oracle10g Rac
VMware Rhel5 Oracle10g Racguest77e407
 
51 cto下载 android应用程序开发宝典
51 cto下载 android应用程序开发宝典51 cto下载 android应用程序开发宝典
51 cto下载 android应用程序开发宝典sys520084
 
Install Oracle11g For Aix 5 L
Install Oracle11g For Aix 5 LInstall Oracle11g For Aix 5 L
Install Oracle11g For Aix 5 Lheima911
 
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境Shengyou Fan
 

Similar to 如何讓Keras能在R語言中運作_安裝教學 (20)

互联网创业服务器运维工具集
互联网创业服务器运维工具集互联网创业服务器运维工具集
互联网创业服务器运维工具集
 
Hadoop开发者入门专刊
Hadoop开发者入门专刊Hadoop开发者入门专刊
Hadoop开发者入门专刊
 
Php可调试团队开发环境配置
Php可调试团队开发环境配置Php可调试团队开发环境配置
Php可调试团队开发环境配置
 
Php可调试团队开发环境配置
Php可调试团队开发环境配置Php可调试团队开发环境配置
Php可调试团队开发环境配置
 
附錄--Anaconda installation
附錄--Anaconda installation附錄--Anaconda installation
附錄--Anaconda installation
 
自动化运维管理
自动化运维管理自动化运维管理
自动化运维管理
 
Phalcon2014 Startup
Phalcon2014 StartupPhalcon2014 Startup
Phalcon2014 Startup
 
Configuration tutorial for pytorch environment under windows.pdf
Configuration tutorial for pytorch environment under windows.pdfConfiguration tutorial for pytorch environment under windows.pdf
Configuration tutorial for pytorch environment under windows.pdf
 
2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt
 
Full Stack Monitoring with Prometheus and Grafana (Updated)
Full Stack Monitoring with Prometheus and Grafana (Updated)Full Stack Monitoring with Prometheus and Grafana (Updated)
Full Stack Monitoring with Prometheus and Grafana (Updated)
 
docker intro
docker introdocker intro
docker intro
 
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
 
使用 Vagrant/Docker 打造团队跨平台开发环境
使用 Vagrant/Docker 打造团队跨平台开发环境 使用 Vagrant/Docker 打造团队跨平台开发环境
使用 Vagrant/Docker 打造团队跨平台开发环境
 
Apache安装配置mod security
Apache安装配置mod securityApache安装配置mod security
Apache安装配置mod security
 
VMware Rhel5 Oracle10g Rac
VMware Rhel5 Oracle10g RacVMware Rhel5 Oracle10g Rac
VMware Rhel5 Oracle10g Rac
 
Dl
DlDl
Dl
 
Flutter實作概述 | GDSC NYCU
Flutter實作概述 | GDSC NYCUFlutter實作概述 | GDSC NYCU
Flutter實作概述 | GDSC NYCU
 
51 cto下载 android应用程序开发宝典
51 cto下载 android应用程序开发宝典51 cto下载 android应用程序开发宝典
51 cto下载 android应用程序开发宝典
 
Install Oracle11g For Aix 5 L
Install Oracle11g For Aix 5 LInstall Oracle11g For Aix 5 L
Install Oracle11g For Aix 5 L
 
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
 

如何讓Keras能在R語言中運作_安裝教學