MCPcopy Create free account
hub / github.com/WeChatCV/WeVisionOne / _get_clones

Function _get_clones

WeVisionOne/utils/utils.py:118–123  ·  view source on GitHub ↗
(module, N, layer_share=False)

Source from the content-addressed store, hash-verified

116
117
118def _get_clones(module, N, layer_share=False):
119
120 if layer_share:
121 return nn.ModuleList([module for i in range(N)])
122 else:
123 return nn.ModuleList([copy.deepcopy(module) for i in range(N)])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected