| 4 | |
| 5 | @HOOKS.register_module() |
| 6 | class GradChecker(Hook): |
| 7 | |
| 8 | def after_train_iter(self, runner): |
| 9 | for key, val in runner.model.named_parameters(): |
| 10 | if val.grad == None and val.requires_grad: |
| 11 | print('WARNNING: {key}\'s parameters are not be used!!!!'.format(key=key)) |
| 12 | |
| 13 |
nothing calls this directly
no outgoing calls
no test coverage detected