You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Outputs: `Tuple` comprising various elements depending on the configuration (config) and inputs:
615
615
**loss**: (`optional`, returned if both ``start_positions`` and ``end_positions`` are provided) ``torch.FloatTensor`` of shape ``(1,)``:
616
616
Classification loss as the sum of start token, end token (and is_impossible if provided) classification losses.
617
-
**last_hidden_state**: `(`optional`, returned if ``start_positions`` or ``end_positions`` is not provided) `torch.FloatTensor`` of shape ``(batch_size, sequence_length, hidden_size)``
618
-
Sequence of hidden-states at the last layer of the model.
619
-
**mems**:
620
-
list of ``torch.FloatTensor`` (one for each layer):
621
-
that contains pre-computed hidden-states (key and values in the attention blocks) as computed by the model
622
-
(see `mems` input above). Can be used to speed up sequential decoding and attend to longer context.
617
+
**start_top_log_probs**: `(`optional`, returned if ``start_positions`` or ``end_positions`` is not provided)
618
+
``torch.FloatTensor`` of shape ``(batch_size, config.start_n_top)``
619
+
Log probabilities for the top config.start_n_top start token possibilities (beam-search).
620
+
**start_top_index**: `(`optional`, returned if ``start_positions`` or ``end_positions`` is not provided)
621
+
``torch.LongTensor`` of shape ``(batch_size, config.start_n_top)``
622
+
Indices for the top config.start_n_top start token possibilities (beam-search).
623
+
**end_top_log_probs**: `(`optional`, returned if ``start_positions`` or ``end_positions`` is not provided)
624
+
``torch.FloatTensor`` of shape ``(batch_size, config.start_n_top * config.end_n_top)``
625
+
Log probabilities for the top ``config.start_n_top * config.end_n_top`` end token possibilities (beam-search).
626
+
**end_top_index**: `(`optional`, returned if ``start_positions`` or ``end_positions`` is not provided)
627
+
``torch.LongTensor`` of shape ``(batch_size, config.start_n_top * config.end_n_top)``
628
+
Indices for the top ``config.start_n_top * config.end_n_top`` end token possibilities (beam-search).
629
+
**cls_logits**: `(`optional`, returned if ``start_positions`` or ``end_positions`` is not provided)
630
+
``torch.FloatTensor`` of shape ``(batch_size,)``
631
+
Log probabilities for the ``is_impossible`` label of the answers.
0 commit comments