The total sequence length is seq_len_total = seq_len_a + seq_len_b. I also have a boolean tensor mask ([batch_size, seq_len_total]) where True corresponds to positions for tensor_a and False corresponds to positions for tensor_b.
How can I efficiently combine tensor_a and tensor_b into a single tensor of shape ([batch_size, seq_len_total, embedding_dim]) using the mask.