- 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
推薦閱讀
- Learning Python Web Penetration Testing
- 流量的秘密:Google Analytics網(wǎng)站分析與優(yōu)化技巧(第2版)
- 零基礎(chǔ)學(xué)Visual C++第3版
- PowerCLI Cookbook
- Flink SQL與DataStream入門(mén)、進(jìn)階與實(shí)戰(zhàn)
- 64位匯編語(yǔ)言的編程藝術(shù)
- 機(jī)械工程師Python編程:入門(mén)、實(shí)戰(zhàn)與進(jìn)階
- Java編程的邏輯
- Mastering Business Intelligence with MicroStrategy
- 零基礎(chǔ)學(xué)C語(yǔ)言程序設(shè)計(jì)
- Instant Automapper
- Getting Started with hapi.js
- Zend Framework 2 Cookbook
- 流暢的Python
- R統(tǒng)計(jì)應(yīng)用開(kāi)發(fā)實(shí)戰(zhàn)