Skip to content

Commit 8521c24

Browse files
Merge pull request #683 from rstudio/bugfix/tf-1.13-changes
fix fit_generator for tfdatasets
2 parents 15a3b94 + df9c71f commit 8521c24

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

R/model.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,11 +925,14 @@ as_generator.default <- function(x) {
925925
}
926926

927927
as_generator.tensorflow.python.data.ops.dataset_ops.Dataset <- function(x) {
928-
python_path <- system.file("python", package = "tfdatasets")
928+
python_path <- system.file("python", package = "keras")
929929
tools <- reticulate::import_from_path("kerastools", path = python_path)
930930
tools$generator$dataset_generator(x , k_get_session())
931931
}
932932

933+
as_generator.tensorflow.python.data.ops.dataset_ops.DatasetV2 <-
934+
as_generator.tensorflow.python.data.ops.dataset_ops.Dataset
935+
933936
as_generator.function <- function(x) {
934937
reticulate::py_iterator(function() keras_array(x()))
935938
}

0 commit comments

Comments
 (0)