Skip to content

Commit

Permalink
remove last_hidden_state for task-specific model
Browse files Browse the repository at this point in the history
  • Loading branch information
SangbumChoi committed May 16, 2024
1 parent 62122ba commit ccb7a34
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/transformers/models/rt_detr/modeling_rt_detr.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ class RTDetrObjectDetectionOutput(ModelOutput):
Optional, only returned when auxiliary losses are activated (i.e. `config.auxiliary_loss` is set to `True`)
and labels are provided. It is a list of dictionaries containing the two above keys (`logits` and
`pred_boxes`) for each decoder layer.
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, num_queries, hidden_size)`):
Sequence of hidden-states at the output of the last layer of the decoder of the model.
intermediate_hidden_states (`torch.FloatTensor` of shape `(batch_size, config.decoder_layers, num_queries, hidden_size)`):
Stacked intermediate hidden states (output of each layer of the decoder).
intermediate_logits (`torch.FloatTensor` of shape `(batch_size, config.decoder_layers, num_queries, config.num_labels)`):
Expand Down Expand Up @@ -329,7 +327,6 @@ class RTDetrObjectDetectionOutput(ModelOutput):
logits: torch.FloatTensor = None
pred_boxes: torch.FloatTensor = None
auxiliary_outputs: Optional[List[Dict]] = None
last_hidden_state: torch.FloatTensor = None
intermediate_hidden_states: torch.FloatTensor = None
intermediate_logits: torch.FloatTensor = None
intermediate_reference_points: torch.FloatTensor = None
Expand Down Expand Up @@ -2659,7 +2656,6 @@ def forward(
logits=logits,
pred_boxes=pred_boxes,
auxiliary_outputs=auxiliary_outputs,
last_hidden_state=outputs.last_hidden_state,
intermediate_hidden_states=outputs.intermediate_hidden_states,
intermediate_logits=outputs.intermediate_logits,
intermediate_reference_points=outputs.intermediate_reference_points,
Expand Down

0 comments on commit ccb7a34

Please sign in to comment.