Skip to content

Commit

Permalink
Update pre.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuLvs authored Nov 27, 2024
1 parent c556b0d commit b8d0ee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def remove_module_prefix(state_dict):
model = CustomDeepLabV3().to(device)

# Load the state dict with 'module.' prefix removed
state_dict = torch.load("../result/best_model.pth", map_location=device)
state_dict = torch.load("./result/best_model.pth", map_location=device)
new_state_dict = remove_module_prefix(state_dict)
model.load_state_dict(new_state_dict)

Expand Down

0 comments on commit b8d0ee1

Please sign in to comment.