How to get a module through its key in state_dict

What I expect:

  1. get model’s state_dict and its keys
  2. get submodules of model through these keys
  3. register forward hook on these modules

Why I cannot use model.children:
I have select modules’ weight_dict through key word filter and it’s hard to say what kind of module will be processed after