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

Function remove_prefix_module

TinyCLIP/src/training/main.py:408–410  ·  view source on GitHub ↗
(state_dict)

Source from the content-addressed store, hash-verified

406 else:
407
408 def remove_prefix_module(state_dict):
409 # remove the first or the second module
410 return convert_to_new_checkpoint(state_dict)
411
412 def add_prefix_module(state_dict):
413 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