MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / clean_state_dict

Function clean_state_dict

util/misc.py:661–667  ·  view source on GitHub ↗
(state_dict)

Source from the content-addressed store, hash-verified

659
660
661def clean_state_dict(state_dict):
662 new_state_dict = OrderedDict()
663 for k, v in state_dict.items():
664 if k[:7] == 'module.':
665 k = k[7:] # remove `module.`
666 new_state_dict[k] = v
667 return new_state_dict

Callers 1

build_backboneFunction · 0.90

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected