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(embeddings, bert_mask, bert_segments)[source]
knrm(bert_output, bert_mask, bert_segments, batch_size)[source]
call(x, **kwargs)[source]
predict_step(data)[source]
score(x, **kwargs)[source]
score_pair(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()[source]