Yes, you could iterate the .named_modules() (or a combination of .named_children() etc.) and register a forward hook on each module, which would then store the outputs in the dict, if you are using the previously posted approach.