MCPcopy Create free account
hub / github.com/OpenDriveLab/OccNet / GradChecker

Class GradChecker

projects/mmdet3d_plugin/models/hooks/hooks.py:6–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5@HOOKS.register_module()
6class 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected