You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if it's possible to implement the from_generator method. I was trying to implement similar to what's in keras, but got a C stack usage error. Here's the minimal example:
library(tensorflow)
library(tfdatasets)
gen <- function() {
i <- 0
function() {
i <<- i + 1
i
}
}
gen2 <- function() reticulate::py_iterator(gen())
dataset <- tf$data$Dataset$from_generator(generator = gen2, output_types = tuple(tf$float64))
iterator <- dataset$make_one_shot_iterator()
the_next <- iterator$get_next()
sess <- tf$Session()
the_next[[1]]$eval(session = sess)
The text was updated successfully, but these errors were encountered:
I wonder if it's possible to implement the
from_generator
method. I was trying to implement similar to what's in keras, but got a C stack usage error. Here's the minimal example:The text was updated successfully, but these errors were encountered: