MCPcopy Create free account
hub / github.com/OpenGVLab/DragGAN / pre_hook

Function pre_hook

draggan/stylegan2/torch_utils/misc.py:200–201  ·  view source on GitHub ↗
(_mod, _inputs)

Source from the content-addressed store, hash-verified

198 entries = []
199 nesting = [0]
200 def pre_hook(_mod, _inputs):
201 nesting[0] += 1
202 def post_hook(mod, _inputs, outputs):
203 nesting[0] -= 1
204 if nesting[0] <= max_nesting:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected