The tensor:
input = torch.tensor(
    [
     [1, 2, 0, 0],
     [3, 4, 5, 6],
     [7, 0, 0, 0]
    ]
)

is a batch of 3 preprocessed sentences in which I must represent as a dense vector. For instance [1, 2, 0, 0] represents the tokens id (and pad token) for the first sentence. Now I want to do something like it:
cnn_text1504×1376 150 KB
for each sentence in the batch.
I am using PyTorch Lightning (which helps a lot) but I am completely confused about how a CNN can be used for text representation.
I think that before passing the input through a convolution block, I could go through an embedding layer, which would produce a shaped tensor [3,4,768] (batch_size, sentence_size, representation_size).