(self)
| 57 | CLS = GradSampleHooks |
| 58 | |
| 59 | def setUp(self): |
| 60 | self.original_model = SampleConvNet() |
| 61 | self.hooks_model = SampleConvNet() |
| 62 | self.hooks_model.load_state_dict(self.original_model.state_dict(), strict=True) |
| 63 | |
| 64 | self.grad_sample_hooks = self.CLS( |
| 65 | self.hooks_model, batch_first=True, loss_reduction="mean" |
| 66 | ) |
| 67 | self.DATA_SIZE = 8 |
| 68 | self.setUp_data() |
| 69 | self.criterion = nn.L1Loss() |
| 70 | |
| 71 | def setUp_data(self): |
| 72 | self.ds = FakeData( |
nothing calls this directly
no test coverage detected