use_backend: Configure a Keras backend

View source: R/install.R

use_backendR Documentation

Configure a Keras backend

Description

Configure a Keras backend

Usage

use_backend(backend)

Arguments

backend

string, can be "tensorflow", "jax", "numpy", or "torch".

Details

These functions allow configuring which backend keras will use. Note that only one backend can be configured at a time.

The function should be called after library(keras3) and before calling other functions within the package (see below for an example).

There is experimental support for changing the backend after keras has initialized. using config_set_backend().

library(keras3)
use_backend("tensorflow")

Value

Called primarily for side effects. Returns the provided backend, invisibly.


rstudio/keras documentation built on April 27, 2024, 10:11 p.m.