Hi @pierrestock, I would like to ask you a question about the hook,
def _register_hooks(self):
# define hook to save output after each layer
def fwd_hook(module, input, output):
layer = self.modules_to_layers[module]
if self._watch:
# retrieve activations
activations = input[0].data.cpu()
# store activations
self.activations[layer].append(activations)
why the activation is the value of input but not the output here? Thanks in advance.
Hi @pierrestock, I would like to ask you a question about the hook,
why the activation is the value of input but not the output here? Thanks in advance.