Just realized that the stack one is also not solving the problem. Let me rephrase the task a little bit.
What I have here is a batch of,
padding_data_1: e.g., abc000, efgh00. Everyone has the same length, padded with 0, where a, b, c, …, stand for embedding vectors.
data_1_len: e.g., [3,4]. The original length of data_1 before padding
data_2: a single embedding for each data point, e.g., [i, j], where i, j stand for embedding vectors.
The target is then
[abc000     ]          [  efgh00]
[iii000         ]  and [   jjjj00]
(Concatenated vertically with padding)