(self, module, input, output)
| 413 | return self.original_forward_func(input_ids=input_ids, labels=labels, attention_mask=attention_mask, **kwargs) |
| 414 | |
| 415 | def post_forward_hook(self, module, input, output): |
| 416 | captured_keys = self.activation_capturer.captured |
| 417 | |
| 418 | self._save_step_data(keys = captured_keys, vals = self.labels) |
| 419 | |
| 420 | return output |
| 421 | |
| 422 | def register_hook(self, layer, func, pre=False): |
| 423 | handle = layer.register_forward_pre_hook(func) if pre else layer.register_forward_hook(func) |
nothing calls this directly
no test coverage detected