MCPcopy 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
13def 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
20def get_state_dict(model, unwrap_fn=unwrap_model):

Callers 1

distribute_bnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected