hwjiang commited on
Commit
2caa23c
1 Parent(s): 90d11eb

Update tsr/system.py

Browse files
Files changed (1) hide show
  1. tsr/system.py +1 -1
tsr/system.py CHANGED
@@ -69,7 +69,7 @@ class TSR(BaseModule):
69
  ckpt = torch.load(weight_path, map_location="cpu")
70
 
71
  if "module" in list(ckpt["state_dict"].keys())[0]:
72
- state_dict = {key.replace('module.',''): item for key, item in checkpoint["state_dict"].items()}
73
  else:
74
  state_dict = ckpt["state_dict"]
75
  missing_states = set(model.state_dict().keys()) - set(state_dict.keys())
 
69
  ckpt = torch.load(weight_path, map_location="cpu")
70
 
71
  if "module" in list(ckpt["state_dict"].keys())[0]:
72
+ state_dict = {key.replace('module.',''): item for key, item in ckpt["state_dict"].items()}
73
  else:
74
  state_dict = ckpt["state_dict"]
75
  missing_states = set(model.state_dict().keys()) - set(state_dict.keys())