Assume I have x = torch.rand(2,50) and y = torch.rand(3,50) and I have a tensor of trainable parameters p with size 50.
How can I use torch.nn.utils.rnn.pad_sequence or any other torch function to be able to create a 2*3*50 tensor where the padding_value is the tensor p?
torch.nn.utils.rnn.pad_sequence([x,y], batch_first=False, padding_value=p)
This throws an error since padding_value should be a number and not a tensor of variables.