capreolus.reranker.TFCEDRKNRM

Module Contents

Classes

TFCEDRKNRM_Class

TFCEDRKNRM

TensorFlow implementation of CEDR-KNRM.

Attributes

logger

capreolus.reranker.TFCEDRKNRM.logger[source]
class capreolus.reranker.TFCEDRKNRM.TFCEDRKNRM_Class(extractor, config, *args, **kwargs)[source]

Bases: tensorflow.keras.layers.Layer

masked_simmats(self, embeddings, bert_mask, bert_segments)[source]
knrm(self, bert_output, bert_mask, bert_segments, batch_size)[source]
call(self, x, **kwargs)[source]
predict_step(self, data)[source]
score(self, x, **kwargs)[source]
score_pair(self, x, **kwargs)[source]
class capreolus.reranker.TFCEDRKNRM.TFCEDRKNRM(config=None, provide=None, share_dependency_objects=False, build=True)[source]

Bases: capreolus.reranker.Reranker

TensorFlow implementation of CEDR-KNRM. Equivalant to BERT-KNRM when cls=None.

CEDR: Contextualized Embeddings for Document Ranking Sean MacAvaney, Andrew Yates, Arman Cohan, and Nazli Goharian. SIGIR 2019. https://arxiv.org/pdf/1904.07094

module_name = TFCEDRKNRM[source]
dependencies[source]
config_spec[source]
build_model(self)[source]