"### Build a BertClassifier model wrapping TransformerEncoder\n",
"### Build a BertClassifier model wrapping TransformerEncoder\n",
"\n",
"\n",
"[BertClassifier](https://github.com/tensorflow/models/blob/master/official/nlp/modeling/models/bert_classifier.py) implements a simple token classification model containing a single classification head using the `TokenClassification` network."
"[BertClassifier](https://github.com/tensorflow/models/blob/master/official/nlp/modeling/models/bert_classifier.py) implements a [CLS] token classification model containing a single classification head."
@@ -20,8 +20,5 @@ into two smaller matrices and shares parameters across layers.
...
@@ -20,8 +20,5 @@ into two smaller matrices and shares parameters across layers.
intended for use as a classification or regression (if number of classes is set
intended for use as a classification or regression (if number of classes is set
to 1) head.
to 1) head.
*[`TokenClassification`](token_classification.py) contains a single hidden
layer, and is intended for use as a token classification head.
*[`SpanLabeling`](span_labeling.py) implements a single-span labeler (that is, a prediction head that can predict one start and end index per batch item) based on a single dense hidden layer. It can be used in the SQuAD task.
*[`SpanLabeling`](span_labeling.py) implements a single-span labeler (that is, a prediction head that can predict one start and end index per batch item) based on a single dense hidden layer. It can be used in the SQuAD task.