MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / hook_fn

Method hook_fn

slowfast/visualization/utils.py:198–199  ·  view source on GitHub ↗
(module, input, output)

Source from the content-addressed store, hash-verified

196 """
197
198 def hook_fn(module, input, output):
199 self.hooks[layer_name] = output.clone().detach()
200
201 layer = get_layer(self.model, layer_name)
202 layer.register_forward_hook(hook_fn)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected