Unverified Commit 4670b57c authored by Thomas Wood's avatar Thomas Wood Committed by GitHub
Browse files

Fix dimention misspellings. (#11238)

* Update modeling_gpt_neo.py

dimention -> dimension

* Update configuration_speech_to_text.py

dimention -> dimension
parent f25444cb
......@@ -155,8 +155,8 @@ class GPTNeoAttentionMixin:
def _look_back(tensor, block_length, window_size, pad_value=0, is_key_value=True):
"""
Used to implement attention between consecutive blocks. This method assumes that dim 1 of :obj:`tensor`
represents the :obj:`seq_length` dimention. It splits :obj:`seq_length` dimention into :obj:`num_blocks` and
:obj:`window_size` + :obj:`block_length`. It pads the :obj:`seq_length` dimention if necessary.
represents the :obj:`seq_length` dimension. It splits :obj:`seq_length` dimension into :obj:`num_blocks` and
:obj:`window_size` + :obj:`block_length`. It pads the :obj:`seq_length` dimension if necessary.
Example::
......@@ -373,7 +373,7 @@ class GPTNeoLocalSelfAttention(nn.Module, GPTNeoAttentionMixin):
# look back into the attention_block such that it will also get padded the same way
# and have 0s in the padded position
attention_mask = self._look_back(attention_mask, block_length, self.window_size, is_key_value=False)
attention_mask = attention_mask.unsqueeze(-2) # Add an extra dimention to account for hidden_dim
attention_mask = attention_mask.unsqueeze(-2) # Add an extra dimension to account for hidden_dim
# Multiply the causal_mask with attention_mask so the padded positions (by _look_back operation)
# will contain 0s.
......@@ -387,7 +387,7 @@ class GPTNeoLocalSelfAttention(nn.Module, GPTNeoAttentionMixin):
visible = torch.gt(relative_position, -self.window_size)
causal_mask = causal_mask * visible
causal_mask = causal_mask.unsqueeze(-3).bool() # Add an extra dimention to account for num_heads
causal_mask = causal_mask.unsqueeze(-3).bool() # Add an extra dimension to account for num_heads
return causal_mask
......
......@@ -90,7 +90,7 @@ class Speech2TextConfig(PretrainedConfig):
An integer defining the number of output channels of each convolution layers except the final one in the
conv module.
input_feat_per_channel (:obj:`int`, `optional`, defaults to 80):
An integer specifying the size of feature vector. This is also the dimentions of log-mel filter-bank
An integer specifying the size of feature vector. This is also the dimensions of log-mel filter-bank
features.
input_channels (:obj:`int`, `optional`, defaults to 1):
An integer specifying number of input channels of the input feature vector.
......
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