MCPcopy
hub / github.com/microsoft/Cream / remove_prefix_module

Function remove_prefix_module

TinyCLIP/src/training/main_for_test.py:336–338  ·  view source on GitHub ↗
(state_dict)

Source from the content-addressed store, hash-verified

334 else:
335
336 def remove_prefix_module(state_dict):
337 # remove the first or the second module
338 return convert_to_new_checkpoint(state_dict)
339
340 def add_prefix_module(state_dict):
341 if all(map(lambda x: not x.startswith('module.'), state_dict.keys())):

Callers 1

mainFunction · 0.70

Calls 1

Tested by

no test coverage detected