MCPcopy
hub / github.com/jindongwang/transferlearning / load_state_dict

Method load_state_dict

code/deep/CSG/methods/supvae.py:84–86  ·  view source on GitHub ↗
(self, state_dict: dict)

Source from the content-addressed store, hash-verified

82 return self._parameter_dict
83
84 def load_state_dict(self, state_dict: dict):
85 for name in list(self._parameter_dict.keys()):
86 with tc.no_grad(): self._parameter_dict[name].copy_(state_dict[name])
87
88 def get_lossfn(self, n_mc_q: int=0, reduction: str="mean", mode: str="defl", weight_da: float=None, wlogpi: float=None):
89 if reduction == "mean": reducefn = tc.mean

Callers 15

finetuneFunction · 0.45
extract_featureFunction · 0.45
finetuneFunction · 0.45
extract_featureFunction · 0.45
evaluateMethod · 0.45
load_pretrained_modelFunction · 0.45
torch_loadFunction · 0.45
train_maml_epochFunction · 0.45
load_pretrained_modelFunction · 0.45
torch_loadFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_ic_uniFunction · 0.36