Two comments:

You define self.out=nn.Linear(2048,1) but your x after flattening is (16, 128). So it should be self.out=nn.Linear(128,1) to fit your current setup.
For a text CNN, Conv1d should be the way to go. Sure each data item is 2d with (seq_len, hidden_dim) but 2d convolutions don’t make sense here. You might want to check examples using Conv1d. For the first layer, it would look like nn.Conv1d(in_channels=embedding_dim, out_channels=..., kernel_size=...). Then you also have to adjust the embedding output with x = embeds.transpose(1, 2), since Conv1d wants (batch size x input_channels x seq_length) as input shape (with input_channels = ‘hidden_dim’ here)

Please see my working example of a Text CNN Classifier 64; sorry, I don’t have it in a proper GitHub repository! Note that I don’t use multiple deep Conv1d layers but multiple parallel ones with different kernel sizes (reflecting different ngram sizes). This is in line with this paper 11.