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

Function load_checkpoint

TinyCLIP/src/open_clip/factory.py:82–86  ·  view source on GitHub ↗
(model, checkpoint_path, strict=True)

Source from the content-addressed store, hash-verified

80
81
82def load_checkpoint(model, checkpoint_path, strict=True):
83 state_dict = load_state_dict(checkpoint_path)
84 resize_pos_embed(state_dict, model)
85 incompatible_keys = model.load_state_dict(state_dict, strict=strict)
86 return incompatible_keys
87
88
89def create_model(

Callers 1

create_modelFunction · 0.70

Calls 3

resize_pos_embedFunction · 0.90
load_state_dictFunction · 0.70
load_state_dictMethod · 0.45

Tested by

no test coverage detected