MCPcopy Create free account
hub / github.com/HiLab-git/SSL4MIS / load_checkpoint

Function load_checkpoint

code/utils/util.py:55–75  ·  view source on GitHub ↗

loads previous checkpoint Args: path (str): path to checkpoint model (model): model to restore checkpoint to optimizer (optimizer): torch optimizer to load optimizer state_dict to from_ddp (bool, optional): load DistributedDataParallel checkpoint to regular model

(path, model, optimizer, from_ddp=False)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

restore_modelFunction · 0.85

Calls 1

load_state_dictMethod · 0.45

Tested by

no test coverage detected