"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "efdbad56ab5e90c223468e862e26f89e422b4782"
Unverified Commit 036e8085 authored by IMvision12's avatar IMvision12 Committed by GitHub
Browse files

Added type hints to `DebertaV2ForMultipleChoice` Pytorch (#19536)

* Update modeling_deberta_v2.py

* Update modeling_deberta_v2.py
parent 7180e172
...@@ -1616,16 +1616,16 @@ class DebertaV2ForMultipleChoice(DebertaV2PreTrainedModel): ...@@ -1616,16 +1616,16 @@ class DebertaV2ForMultipleChoice(DebertaV2PreTrainedModel):
) )
def forward( def forward(
self, self,
input_ids=None, input_ids: Optional[torch.Tensor] = None,
attention_mask=None, attention_mask: Optional[torch.Tensor] = None,
token_type_ids=None, token_type_ids: Optional[torch.Tensor] = None,
position_ids=None, position_ids: Optional[torch.Tensor] = None,
inputs_embeds=None, inputs_embeds: Optional[torch.Tensor] = None,
labels=None, labels: Optional[torch.Tensor] = None,
output_attentions=None, output_attentions: Optional[bool] = None,
output_hidden_states=None, output_hidden_states: Optional[bool] = None,
return_dict=None, return_dict: Optional[bool] = None,
): ) -> Union[Tuple, MultipleChoiceModelOutput]:
r""" r"""
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
Labels for computing the multiple choice classification loss. Indices should be in `[0, ..., Labels for computing the multiple choice classification loss. Indices should be in `[0, ...,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment