"tools/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "56cbbdfb0100b2f0be26da3a91f62de30799762f"
Commit 122d5c52 authored by VictorSanh's avatar VictorSanh
Browse files

distinguish was is not trained

parent 2647ac32
...@@ -214,7 +214,8 @@ def bertForSequenceClassification(*args, **kwargs): ...@@ -214,7 +214,8 @@ def bertForSequenceClassification(*args, **kwargs):
""" """
BertForSequenceClassification is a fine-tuning model that includes BertForSequenceClassification is a fine-tuning model that includes
BertModel and a sequence-level (sequence or pair of sequences) classifier BertModel and a sequence-level (sequence or pair of sequences) classifier
on top of the BertModel. on top of the BertModel. Note that the classification head is only initialized
and has to be trained.
The sequence-level classifier is a linear layer that takes as input the The sequence-level classifier is a linear layer that takes as input the
last hidden state of the first character in the input sequence last hidden state of the first character in the input sequence
...@@ -252,7 +253,8 @@ def bertForSequenceClassification(*args, **kwargs): ...@@ -252,7 +253,8 @@ def bertForSequenceClassification(*args, **kwargs):
def bertForMultipleChoice(*args, **kwargs): def bertForMultipleChoice(*args, **kwargs):
""" """
BertForMultipleChoice is a fine-tuning model that includes BertModel and a BertForMultipleChoice is a fine-tuning model that includes BertModel and a
linear layer on top of the BertModel. linear layer on top of the BertModel. Note that the multiple choice head is
only initialized and has to be trained.
Args: Args:
num_choices: the number (>=2) of classes for the classifier. num_choices: the number (>=2) of classes for the classifier.
...@@ -287,7 +289,8 @@ def bertForQuestionAnswering(*args, **kwargs): ...@@ -287,7 +289,8 @@ def bertForQuestionAnswering(*args, **kwargs):
""" """
BertForQuestionAnswering is a fine-tuning model that includes BertModel BertForQuestionAnswering is a fine-tuning model that includes BertModel
with a token-level classifiers on top of the full sequence of last hidden with a token-level classifiers on top of the full sequence of last hidden
states. states. Note that the classification head is only initialized
and has to be trained.
Example: Example:
# Load the tokenizer # Load the tokenizer
...@@ -318,7 +321,8 @@ def bertForQuestionAnswering(*args, **kwargs): ...@@ -318,7 +321,8 @@ def bertForQuestionAnswering(*args, **kwargs):
def bertForTokenClassification(*args, **kwargs): def bertForTokenClassification(*args, **kwargs):
""" """
BertForTokenClassification is a fine-tuning model that includes BertModel BertForTokenClassification is a fine-tuning model that includes BertModel
and a token-level classifier on top of the BertModel. and a token-level classifier on top of the BertModel. Note that the classification
head is only initialized and has to be trained.
The token-level classifier is a linear layer that takes as input the last The token-level classifier is a linear layer that takes as input the last
hidden state of the sequence. hidden state of the sequence.
......
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