Closed Hlaneunim closed 9 months ago
If you want to disable eager execution globally, you can call:
library(tensorflow)
tf$compat$v1$disable_eager_execution()
This should only be necessary for old codebases that were written for TF v1. With TF v2, the primary way users are expected to enter "graph" mode is via tf_function()
.
Calling k_gradients, this error presents me:
Error in py_call_impl(callable, call_args$unnamed, call_args$named) : RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead. Run
reticulate::py_last_error()
for details.How do I disable eager in R? Searched without help