capreolus.reranker.HINT

Module Contents

Classes

GRUCell2d(input_size, hidden_size, bias=True)
GRUModel2d(input_dim, hidden_dim, bias=True)
HiNT(weights_matrix, p)
HiNT_main(extractor, config)
HINT()
capreolus.reranker.HINT.device[source]
class capreolus.reranker.HINT.GRUCell2d(input_size, hidden_size, bias=True)[source]

Bases: torch.nn.Module

reset_parameters(self)[source]
softmax_by_row(self, zi, zl, zt, zd)[source]
forward(self, x, hidden_i1_j1, hidden_i1_j, hidden_i_j1)[source]
class capreolus.reranker.HINT.GRUModel2d(input_dim, hidden_dim, bias=True)[source]

Bases: torch.nn.Module

forward(self, x)[source]
class capreolus.reranker.HINT.HiNT(weights_matrix, p)[source]

Bases: torch.nn.Module

init_hidden(self)[source]
matrix_inv(self, A)[source]
forward(self, sentence, query_sentence, M_XOR, M_cos, masks)[source]

M_XOR or M_cos: (B, Q, D) masks: (B, Q, D) have 0 on non-pad positions and 1 on pad positions

class capreolus.reranker.HINT.HiNT_main(extractor, config)[source]

Bases: torch.nn.Module

init_hidden(self)[source]
forward(self, query_sentence, query_idf, pos_sentence, neg_sentence)[source]
test_forward(self, query_sentence, query_idf, pos_sentence)[source]
class capreolus.reranker.HINT.HINT[source]

Bases: capreolus.reranker.Reranker

module_name = HINT[source]
description = Yixing Fan, Jiafeng Guo, Yanyan Lan, Jun Xu, Chengxiang Zhai, and Xueqi Cheng. 2018. Modeling Diverse Relevance Patterns in Ad-hoc Retrieval. In SIGIR'18.[source]
config_spec[source]
test(self, query_sentence, query_idf, pos_sentence, *args, **kwargs)[source]
score(self, d)[source]
zero_grad(self, *args, **kwargs)[source]
build_model(self)[source]