MCPcopy Create free account
hub / github.com/ModalityDance/Omni-R1 / BackboneOutput

Class BackboneOutput

src/transformers/src/transformers/modeling_outputs.py:1438–1461  ·  view source on GitHub ↗

Base class for outputs of backbones. Args: feature_maps (`tuple(torch.FloatTensor)` of shape `(batch_size, num_channels, height, width)`): Feature maps of the stages. hidden_states (`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True

Source from the content-addressed store, hash-verified

1436
1437@dataclass
1438class BackboneOutput(ModelOutput):
1439 """
1440 Base class for outputs of backbones.
1441
1442 Args:
1443 feature_maps (`tuple(torch.FloatTensor)` of shape `(batch_size, num_channels, height, width)`):
1444 Feature maps of the stages.
1445 hidden_states (`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
1446 Tuple of `torch.FloatTensor` (one for the output of the embeddings + one for the output of each layer) of
1447 shape `(batch_size, sequence_length, hidden_size)` or `(batch_size, num_channels, height, width)`,
1448 depending on the backbone.
1449
1450 Hidden-states of the model at the output of each stage plus the initial embedding outputs.
1451 attentions (`tuple(torch.FloatTensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
1452 Tuple of `torch.FloatTensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
1453 sequence_length)`. Only applicable if the backbone uses attention.
1454
1455 Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
1456 heads.
1457 """
1458
1459 feature_maps: Tuple[torch.FloatTensor] = None
1460 hidden_states: Optional[Tuple[torch.FloatTensor, ...]] = None
1461 attentions: Optional[Tuple[torch.FloatTensor, ...]] = None
1462
1463
1464@dataclass

Callers 15

forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected