MCPcopy
hub / github.com/fudan-generative-vision/champ / torch_dfs

Function torch_dfs

models/mutual_self_attention.py:12–16  ·  view source on GitHub ↗
(model: torch.nn.Module)

Source from the content-addressed store, hash-verified

10
11
12def torch_dfs(model: torch.nn.Module):
13 result = [model]
14 for child in model.children():
15 result += torch_dfs(child)
16 return result
17
18
19class ReferenceAttentionControl:

Callers 3

updateMethod · 0.85
clearMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected