I would like to have 2 tensors of the same size([128,68,1]) but one containing the left part of each sample and a lot of zeros to match the max_len which is 68, and the other containing the right part and then a lot of zeros.
This is an example for a single, small sample:
max_len = 10
split = 3
left_weights = torch.tensor ([10,3,1,20,4,0,0,0,0,0])

# separate in the split position
l, m_l = left_weights[0:split], left_weights[split:]

# fill with zeros
l = F.pad(l, (0,max_len - len(l)))
m_l = F.pad(m_l, (0,max_len - len(m_l)))

The results should look like this:
l  = tensor([ 10,   3,   1,   0,   0,   0,   0,   0,   0,   0]),
m_l = tensor([ 20,   4,   0,   0,   0,   0,   0,   0,   0,   0])