(self, module, input)
| 51 | self.TInv = TInv |
| 52 | |
| 53 | def _save_input(self, module, input): |
| 54 | if torch.is_grad_enabled() and self.steps % self.TCov == 0: |
| 55 | aa = self.CovAHandler(input[0].data, module) |
| 56 | # Initialize buffers |
| 57 | if self.steps == 0: |
| 58 | self.m_aa[module] = torch.diag(aa.new(aa.size(0)).fill_(1)) |
| 59 | update_running_stat(aa, self.m_aa[module], self.stat_decay) |
| 60 | |
| 61 | def _save_grad_output(self, module, grad_input, grad_output): |
| 62 | # Accumulate statistics for Fisher matrices |
nothing calls this directly
no test coverage detected