MCPcopy Create free account
hub / github.com/BeastyZ/ConvSearch-R1 / query_emb

Method query_emb

src/eval/models.py:30–36  ·  view source on GitHub ↗
(self, input_ids, attention_mask)

Source from the content-addressed store, hash-verified

28 module.weight.data.normal_(mean=0.0, std=0.02)
29
30 def query_emb(self, input_ids, attention_mask):
31 outputs1 = self.roberta(input_ids=input_ids,
32 attention_mask=attention_mask)
33 outputs1 = outputs1.last_hidden_state
34 full_emb = self.masked_mean_or_first(outputs1, attention_mask)
35 query1 = self.norm(self.embeddingHead(full_emb))
36 return query1
37
38
39 def doc_emb(self, input_ids, attention_mask):

Callers 2

doc_embMethod · 0.95
forwardMethod · 0.95

Calls 1

masked_mean_or_firstMethod · 0.95

Tested by

no test coverage detected