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