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
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
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 |
Source code in models/tts/delightful_tts/conv_blocks/conv1d_glu.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|