"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e95d262f2553859af9bffbfe5f5bc7e362259939"
Unverified Commit 7e7e4753 authored by Thomas Wolf's avatar Thomas Wolf Committed by GitHub
Browse files

Merge pull request #480 from mboyanov/docs/cls_token_info

Extend the BertForSequenceClassification docs to mention the special CLS token.
parents bb61b747 34cf67fd
...@@ -930,7 +930,7 @@ class BertForSequenceClassification(BertPreTrainedModel): ...@@ -930,7 +930,7 @@ class BertForSequenceClassification(BertPreTrainedModel):
Inputs: Inputs:
`input_ids`: a torch.LongTensor of shape [batch_size, sequence_length] `input_ids`: a torch.LongTensor of shape [batch_size, sequence_length]
with the word token indices in the vocabulary(see the tokens preprocessing logic in the scripts with the word token indices in the vocabulary. Items in the batch should begin with the special "CLS" token. (see the tokens preprocessing logic in the scripts
`extract_features.py`, `run_classifier.py` and `run_squad.py`) `extract_features.py`, `run_classifier.py` and `run_squad.py`)
`token_type_ids`: an optional torch.LongTensor of shape [batch_size, sequence_length] with the token `token_type_ids`: an optional torch.LongTensor of shape [batch_size, sequence_length] with the token
types indices selected in [0, 1]. Type 0 corresponds to a `sentence A` and type 1 corresponds to types indices selected in [0, 1]. Type 0 corresponds to a `sentence A` and type 1 corresponds to
......
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