I'm having trouble understanding how the TensorFlow data API (tensorflow.data.Dataset) works. My input is a list of lists of integers that I want to batch, pad and concatenate. E.g my data looks like this
data = [[1, 2, 3, 4, 5, 6, 7],
[1, 2, 3, 4],
[1]]
with batch size 3 it should become:
[[[1, 2, 3], [4, 5, 6], [7, 0, 0]],
[[1, 2, 3], [4, 0, 0]],
[[1, 0, 0]]]
and finally:
[[1, 2, 3], [4, 5, 6], [7, 0, 0],
[1, 2, 3], [4, 0, 0], [1, 0, 0]]