Conv1dGLU
Conv1dGLU
Bases: Module
Conv1dGLU
implements a variant of Convolutional Layer with a Gated Linear Unit (GLU).
It's based on the Deep Voice 3 project.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
d_model |
int
|
model dimension parameter. |
required |
kernel_size |
int
|
kernel size for the convolution layer. |
required |
padding |
int
|
padding size for the convolution layer. |
required |
embedding_dim |
int
|
dimension of the embedding. |
required |
Attributes:
Name | Type | Description |
---|---|---|
bsconv1d |
BSConv1d)
|
an instance of the Binarized Separated Convolution (1d) |
embedding_proj |
Linear
|
linear transformation for embeddings. |
sqrt |
Tensor
|
buffer that stores the square root of 0.5 |
softsign |
SoftSign
|
SoftSign Activation function |
Source code in models/tts/delightful_tts/conv_blocks/conv1d_glu.py
forward(x, embeddings)
Forward propagation method for the Conv1dGLU layer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Tensor
|
input tensor |
required |
embeddings |
Tensor
|
input embeddings |
required |
Returns:
Name | Type | Description |
---|---|---|
x |
Tensor
|
output tensor after application of Conv1dGLU |