Skip to content

Commit 4611178

Browse files
xiu-csCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent d74a76d commit 4611178

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/FMPose3D_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def print_error_action(action_error_sum, is_train):
344344
model_dict = model["CFM"].state_dict()
345345
model_path = args.model_weights_path
346346
print(model_path)
347-
pre_dict = torch.load(model_path, weights_only=True)
347+
pre_dict = torch.load(model_path, map_location=device, weights_only=True)
348348
for name, key in model_dict.items():
349349
model_dict[name] = pre_dict[name]
350350
model["CFM"].load_state_dict(model_dict)

0 commit comments

Comments
 (0)