Skip to content

Commit

Permalink
[fix] renaming variable and docstring do object queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenzobattistela committed Jul 11, 2023
1 parent cde3c93 commit 7af5048
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/transformers/models/detr/modeling_detr.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,8 @@ def forward(
attention_mask (`torch.FloatTensor`): attention mask of size
`(batch, 1, target_len, source_len)` where padding elements are indicated by very large negative
values.
object_queries (`torch.FloatTensor`, *optional*): Object queries (also called content embeddings), to be added to the hidden states.
object_queries (`torch.FloatTensor`, *optional*):
Object queries (also called content embeddings), to be added to the hidden states.
output_attentions (`bool`, *optional*):
Whether or not to return the attentions tensors of all attention layers. See `attentions` under
returned tensors for more detail.
Expand Down Expand Up @@ -1337,7 +1338,7 @@ def forward(
decoder_outputs = self.decoder(
inputs_embeds=queries,
attention_mask=None,
position_embeddings=position_embeddings,
object_queries=object_queries,
query_position_embeddings=query_position_embeddings,
encoder_hidden_states=encoder_outputs[0],
encoder_attention_mask=flattened_mask,
Expand Down

0 comments on commit 7af5048

Please sign in to comment.