// Graph mode
// First create necessary graph ops
ds_iters = [None] * len(flat_ds)
with utils.maybe_with_graph(graph, create_if_none=False):
for i, ds_el in enumerate(flat_ds):
if isinstance(ds_el, tf.data.Dataset):
ds_iters[i] = tf.compat.v1.data.make_one_shot_iterator(
After Change
])
// Merge the datasets iterators and np array
iter_ds = iter(ds_iters)
iter_array = iter(np_arrays)
flat_np = [
next(iter_ds) if _is_ds(ds_el) else next(iter_array)
for ds_el in flat_ds