- R Deep Learning Cookbook
- Dr. PKS Prakash Achyutuni Sri Krishna Rao
- 132字
- 2021-07-02 20:49:06
How to do it...
- Once all the mentioned dependencies are installed, tensorflow can be installed from devtools directly using the install_github command as follows:
devtools::install_github("rstudio/tensorflow")
- Before loading tensorflow in R, you need to set up the path for Python as the system environment variable. This can be done directly from the R environment, as shown in the following command:
Sys.setenv(TENSORFLOW_PYTHON="/usr/bin/python")
library(tensorflow)
If the Python tensorflow module is not installed, R will give the following error:

Error raised by R if tensorflow in Python is not installed
tensorflow in Python can be installed using pip:
pip install tensorflow # Python 2.7 with no GPU support
pip3 install tensorflow # Python 3.x with no GPU support
pip install tensorflow-gpu # Python 2.7 with GPU support
pip3 install tensorflow-gpu # Python 3.x with GPU support
推薦閱讀
- Learn Blockchain Programming with JavaScript
- TensorFlow Lite移動端深度學習
- ASP.NET Core 2 and Vue.js
- Python Deep Learning
- Django:Web Development with Python
- Python程序設計
- Xamarin.Forms Projects
- C#實踐教程(第2版)
- Android應用開發實戰
- Clojure High Performance Programming(Second Edition)
- Python滲透測試編程技術:方法與實踐(第2版)
- HTML5程序設計基礎教程
- 虛擬現實:引領未來的人機交互革命
- Mastering Unity Scripting
- Swift從入門到精通 (移動開發叢書)