README.md 943 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
# Models

Models are combinations of layers and networks that would be trained.

Several pre-built canned models are provided to train encoder networks. These
models are intended as both convenience functions and canonical examples.

* [`BertClassifier`](bert_classifier.py) implements a simple classification
model containing a single classification head using the Classification network.

11
12
13
14
* [`BertTokenClassifier`](bert_token_classifier.py) implements a simple token
classification model containing a single classification head using the
TokenClassification network.

15
16
17
18
19
20
21
* [`BertSpanLabeler`](bert_span_labeler.py) implementats a simple single-span
start-end predictor (that is, a model that predicts two values: a start token
index and an end token index), suitable for SQuAD-style tasks.

* [`BertPretrainer`](bert_pretrainer.py) implements a masked LM and a
classification head using the Masked LM and Classification networks,
respectively.