capreolus.reranker.parade

Module Contents

Classes

TFParade_Class
TFParade TensorFlow implementation of PARADE.
class capreolus.reranker.parade.TFParade_Class(extractor, config, *args, **kwargs)[source]

Bases: tensorflow.keras.layers.Layer

aggregate_using_maxp(self, cls)[source]

cls has the shape [B, num_passages, hidden_size]

aggregate_using_transformer(self, cls)[source]
call(self, x, **kwargs)[source]
predict_step(self, data)[source]

Scores each passage and applies max pooling over it.

score(self, x, **kwargs)[source]
score_pair(self, x, **kwargs)[source]
class capreolus.reranker.parade.TFParade(config=None, provide=None, share_dependency_objects=False, build=True)[source]

Bases: capreolus.reranker.Reranker

TensorFlow implementation of PARADE.

PARADE: Passage Representation Aggregation for Document Reranking. Canjia Li, Andrew Yates, Sean MacAvaney, Ben He, and Yingfei Sun. arXiv 2020. https://arxiv.org/pdf/2008.09093.pdf

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