Spaces:
Runtime error
Runtime error
Update tsr/system.py
Browse files- 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
|
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())
|