Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/UX-Decoder/Semantic-SAM
/ _get_clones
Function
_get_clones
semantic_sam/body/decoder/utils/utils.py:118–123 ·
view source on GitHub ↗
(module, N, layer_share=False)
Source
from the content-addressed store, hash-verified
116
117
118
def
_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
2
__init__
Method · 0.70
__init__
Method · 0.50
Calls
no outgoing calls
Tested by
no test coverage detected