Skip to content

Commit b483b61

Browse files
author
Sigrid Keydana
committed
return a tuple as required by _get_next_batch in training_generator.py
1 parent 88b789c commit b483b61

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
@@ -936,7 +936,10 @@ as_generator.tensorflow.python.data.ops.dataset_ops.DatasetV2 <-
936936
as_generator.function <- function(x) {
937937
python_path <- system.file("python", package = "keras")
938938
tools <- reticulate::import_from_path("kerastools", path = python_path)
939-
iter <- reticulate::py_iterator(function() keras_array(x()))
939+
iter <- reticulate::py_iterator(function() {
940+
elem <- x()
941+
reticulate::tuple(elem[1], elem[2])
942+
})
940943
tools$generator$iter_generator(iter)
941944
}
942945

0 commit comments

Comments
 (0)