Skip to content

Commit

Permalink
updates for R 4.4
Browse files Browse the repository at this point in the history
Compare `numeric_version()` with strings, not numerics.
  • Loading branch information
t-kalinowski committed Apr 19, 2024
1 parent d79fa5d commit 32153d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/training_run.R
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ reset_tf_graph <- function() {
tryCatch({
if (reticulate::py_module_available("tensorflow")) {
tf <- reticulate::import("tensorflow")
if (tf_version(tf) >= 1.13 && !tf$executing_eagerly())
if(tf_version(tf) >= 2.0) {
if (tf_version(tf) >= "1.13" && !tf$executing_eagerly())
if(tf_version(tf) >= "2.0") {
tf$compat$v1$reset_default_graph()
} else {
tf$reset_default_graph()
Expand Down

0 comments on commit 32153d7

Please sign in to comment.