Commit 72291287 authored by Myle Ott's avatar Myle Ott Committed by Facebook Github Bot
Browse files

Lint

Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/574

Differential Revision: D15317984

Pulled By: myleott

fbshipit-source-id: 09a66229cc6b4c95678ca1ca13c9e0da25b203de
parent b95f1b5d
...@@ -19,19 +19,21 @@ class LightweightConv1d(nn.Module): ...@@ -19,19 +19,21 @@ class LightweightConv1d(nn.Module):
We don't use this module in the model. We don't use this module in the model.
Args: Args:
input_size: # of channels of the input and output input_size: # of channels of the input and output
kernel_size: convolution channels kernel_size: convolution channels
padding: padding padding: padding
num_heads: number of heads used. The weight is of shape (num_heads, 1, kernel_size) num_heads: number of heads used. The weight is of shape
weight_softmax: normalize the weight with softmax before the convolution `(num_heads, 1, kernel_size)`
weight_softmax: normalize the weight with softmax before the convolution
Shape: Shape:
Input: BxCxT, i.e. (batch_size, input_size, timesteps) Input: BxCxT, i.e. (batch_size, input_size, timesteps)
Output: BxCxT, i.e. (batch_size, input_size, timesteps) Output: BxCxT, i.e. (batch_size, input_size, timesteps)
Attributes: Attributes:
weight: the learnable weights of the module of shape weight: the learnable weights of the module of shape
`(num_heads, 1, kernel_size)` `(num_heads, 1, kernel_size)`
bias: the learnable bias of the module of shape `(input_size)` bias: the learnable bias of the module of shape `(input_size)`
''' '''
def __init__(self, input_size, kernel_size=1, padding=0, num_heads=1, def __init__(self, input_size, kernel_size=1, padding=0, num_heads=1,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment