Fix typo in comment (#14102)

This commit is contained in:
stalkermustang 2021-10-21 22:29:17 +03:00 committed by GitHub
parent 234cfefbb0
commit f00bceab8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -808,7 +808,7 @@ class GPT2Model(GPT2PreTrainedModel):
attention_mask = attention_mask.to(dtype=self.dtype) # fp16 compatibility
attention_mask = (1.0 - attention_mask) * -10000.0
# If a 2D ou 3D attention mask is provided for the cross-attention
# If a 2D or 3D attention mask is provided for the cross-attention
# we need to make broadcastable to [batch_size, num_heads, seq_length, seq_length]
if self.config.add_cross_attention and encoder_hidden_states is not None:
encoder_batch_size, encoder_sequence_length, _ = encoder_hidden_states.size()