Description Usage Arguments Details Examples
Select a Keras implementation and backend
1 2 3 | use_implementation(implementation = c("keras", "tensorflow"))
use_backend(backend = c("tensorflow", "cntk", "theano", "plaidml"))
|
implementation |
One of "keras" or "tensorflow" (defaults to "keras"). |
backend |
One of "tensorflow", "cntk", or "theano" (defaults to "tensorflow") |
Keras has multiple implementations (the original keras implementation and the implementation native to TensorFlow) and supports multiple backends ("tensorflow", "cntk", "theano", and "plaidml"). These functions allow switching between the various implementations and backends.
The functions should be called after library(keras)
and before calling
other functions within the package (see below for an example).
The default implementation and backend should be suitable for most use cases. The "tensorflow" implementation is useful when using Keras in conjunction with TensorFlow Estimators (the tfestimators R package).
1 2 3 4 5 6 7 8 9 10 | ## Not run:
# use the tensorflow implementation
library(keras)
use_implementation("tensorflow")
# use the cntk backend
library(keras)
use_backend("theano")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.