Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

install_tensorflow

Install TensorFlow and its dependencies


Description

Install TensorFlow and its dependencies

Usage

install_tensorflow(
  method = c("auto", "virtualenv", "conda"),
  conda = "auto",
  version = "default",
  envname = NULL,
  extra_packages = NULL,
  restart_session = TRUE,
  conda_python_version = "3.7",
  ...
)

Arguments

method

Installation method. By default, "auto" automatically finds a method that will work in the local environment. Change the default to force a specific installation method. Note that the "virtualenv" method is not available on Windows (as this isn't supported by TensorFlow). Note also that since this command runs without privilege the "system" method is available only on Windows.

conda

The path to a conda executable. Use "auto" to allow reticulate to automatically find an appropriate conda binary. See Finding Conda for more details.

version

TensorFlow version to install. Up to and including TensorFlow 2.0, specify "default" to install the CPU version of the latest release; specify "gpu" to install the GPU version of the latest release. Starting from TensorFlow 2.1, by default a version is installed that works on both GPU- and CPU-only systems. Specify "cpu" to install a CPU-only version.

You can also provide a full major.minor.patch specification (e.g. "1.1.0"), appending "-gpu" if you want the GPU version (e.g. "1.1.0-gpu").

Alternatively, you can provide the full URL to an installer binary (e.g. for a nightly binary).

envname

Name of Python environment to install within

extra_packages

Additional Python packages to install along with TensorFlow.

restart_session

Restart R session after installing (note this will only occur within RStudio).

conda_python_version

the python version installed in the created conda environment. Python 3.6 is installed by default.

...

other arguments passed to reticulate::conda_install() or reticulate::virtualenv_install().


tensorflow

R Interface to 'TensorFlow'

v2.4.0
Apache License 2.0
Authors
Daniel Falbel [ctb, cph, cre], JJ Allaire [aut, cph], RStudio [cph, fnd], Yuan Tang [aut, cph] (<https://orcid.org/0000-0001-5243-233X>), Dirk Eddelbuettel [ctb, cph], Nick Golding [ctb, cph], Tomasz Kalinowski [ctb, cph], Google Inc. [ctb, cph] (Examples and Tutorials)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.