Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QWTforGithub/T2LDM
/ unwrap_model
Function
unwrap_model
timm/utils/model.py:13–17 ·
view source on GitHub ↗
(model)
Source
from the content-addressed store, hash-verified
11
12
13
def
unwrap_model(model):
14
if
isinstance(model, ModelEma):
15
return
unwrap_model(model.ema)
16
else
:
17
return
model.module
if
hasattr(model,
'module'
)
else
model
18
19
20
def
get_state_dict(model, unwrap_fn=unwrap_model):
Callers
1
distribute_bn
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected