- 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
推薦閱讀
- 從零開始構建企業級RAG系統
- Python數據挖掘與機器學習實戰
- Drupal 8 Configuration Management
- C++編程兵書
- Building Serverless Architectures
- Learning Unreal Engine Game Development
- Getting Started with Electronic Projects
- WCF技術剖析(卷1)
- Clojure for Finance
- C語言編程魔法書:基于C11標準
- jQuery EasyUI從零開始學
- Learning Java by Building Android Games
- C語言從入門到精通(第4版)
- 深入解析WPF編程
- PHP7實踐指南:O2O網站與App后臺開發