To install the three R packages that support TensorFlow and Keras in R, execute the following commands in R.
- First, install devtools:
install.packages("devtools")
- Install the tensorflow and tfestimators package:
devtools::install_github("rstudio/tensorflow")
devtools::install_github("rstudio/tfestimators")
- Load the tensorflow library and install the required functions:
library(tensorflow)
install_tensorflow()
- By default, the install function creates a virtual environment and installs the tensorflow package in the virtual environment.
There are four installation methods available, which can be specified using the method parameter:
auto | Automatically choose a default for the current platform |
virtualenv | Install into the virtual environment located at ~/.virtualenvs/r-tensorflow |
conda | Install... |