I want to save outputs of intermediate layers using hooks.
Two questions:
-
Is it possible to pass a dictionary to a forward hook, and not use a global dictionary?
-
Can we identify a specific layer inside the hook function, and not just the module name(using
self.__class__.__name__
)?
Thanks