(self, input_ids, attention_mask)
| 37 | module.weight.data.normal_(mean=0.0, std=0.02) |
| 38 | |
| 39 | def query_emb(self, input_ids, attention_mask): |
| 40 | outputs1 = self.roberta(input_ids=input_ids, attention_mask=attention_mask) |
| 41 | outputs1 = outputs1.last_hidden_state |
| 42 | full_emb = self.masked_mean_or_first(outputs1, attention_mask) |
| 43 | query1 = self.norm(self.embeddingHead(full_emb)) |
| 44 | return query1 |
| 45 | |
| 46 | def doc_emb(self, input_ids, attention_mask): |
| 47 | return self.query_emb(input_ids, attention_mask) |
no test coverage detected