Skip to content

Commit 7518def

Browse files
keep wrapping kenerator in keras_array()
1 parent d57e67f commit 7518def

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/model.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ as_generator.function <- function(x) {
937937
python_path <- system.file("python", package = "keras")
938938
tools <- reticulate::import_from_path("kerastools", path = python_path)
939939
iter <- reticulate::py_iterator(function() {
940-
elem <- x()
940+
elem <- keras_array(x())
941941
reticulate::tuple(elem[1], elem[2])
942942
})
943943
tools$generator$iter_generator(iter)

0 commit comments

Comments
 (0)