(self, tokens, masks)
| 51 | return logits_list |
| 52 | |
| 53 | def forward(self, tokens, masks): |
| 54 | bert_feature, _ = self.bert(tokens, masks) |
| 55 | bert_feature = self.dropout_output(bert_feature) |
| 56 | |
| 57 | bert_feature = bert_feature.unsqueeze(2).expand([-1, -1, self.args.max_sequence_len, -1]) |
| 58 | bert_feature_T = bert_feature.transpose(1, 2) |
| 59 | features = torch.cat([bert_feature, bert_feature_T], dim=3) |
| 60 | logits = self.multi_hops(features, masks, self.args.nhops) |
| 61 | |
| 62 | return logits[-1] |
nothing calls this directly
no test coverage detected