(self, input_ids=None, attention_mask=None, labels=None, **kwargs)
| 148 | return dists, knns |
| 149 | |
| 150 | def pre_forward_hook(self, input_ids=None, attention_mask=None, labels=None, **kwargs): |
| 151 | self.labels = labels |
| 152 | self.input_ids = input_ids |
| 153 | return self.original_forward_func(input_ids=input_ids, labels=labels, attention_mask=attention_mask, **kwargs) |
| 154 | |
| 155 | def post_forward_hook(self, module, input, output): |
| 156 | batch, time_dim, vocab_size = output.shape |