ConvGLU

class ConvGLU(input_dim, kernel_size, dropout)[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.

forward(H)[source]
Htorch Tensor

Output from the previous encoder layer. Shape of (batch size, sequence length, hidden dim / number of “channels”).