ConvEncoder¶
-
class
ConvEncoder
(num_embeddings, embedding_dim, max_seq_len, padding_idx, token_dropout, hidden_dim, kernel_size, dropout, num_conv_layers)[source]¶ CNN based encoder. Inputs are padded on both sides before passing through a 1D CNN, a GLU activation function, a skip connection, an optional dropout layer and a fully connected linear layer.