I have two tf.data.Dataset, let call them d1 and d2 and I want to construct another dataset that constains the elements of d1 and d2 alternating. It is easier to explain with an example.
Let say:
d1 = [0,1,2,3,4,5,6,7,...] # it is not a list, just the content of the dataset
d2 = ["a", "b", "c", "d",... ]
and I have the couple specifying the number of consecutive elements from each dataset (for example (3,1)).
The result that I am looking for is:
result = [0, 1, 2, "a", 3, 4, 5, "b", 6, 7, 8, "c"...]
EDIT: d1 and d2 are objects of the class tf.data.Dataset. The example above shows just the content of the datasets but it is not code.