capreolus.reranker.TFVanillaBert
¶
Module Contents¶
Classes¶
TensorFlow implementation of Vanilla BERT. |
Attributes¶
- class capreolus.reranker.TFVanillaBert.TFVanillaBert_Class(extractor, config, *args, **kwargs)[source]¶
Bases:
tensorflow.keras.layers.Layer
- class capreolus.reranker.TFVanillaBert.TFVanillaBERT(config=None, provide=None, share_dependency_objects=False, build=True)[source]¶
Bases:
capreolus.reranker.Reranker
TensorFlow implementation of Vanilla BERT. Input is of the form [CLS] sentence A [SEP] sentence B [SEP] The “score” of a query (sentence A) - document (sentence B) pair is the probability that the document is relevant to the query. This is achieved through a linear classifier layer attached to BERT’s last layer and using the logits[1] as the score.