Skip to content

Commit

Permalink
Update nnfabrik/utility/nn_helpers.py
Browse files Browse the repository at this point in the history
Co-authored-by: Max Burg <[email protected]>
  • Loading branch information
KonstantinWilleke and MaxFBurg authored Apr 8, 2024
1 parent 9c5ca97 commit d07ff04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nnfabrik/utility/nn_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def load_state_dict(
stripped_state_dict[new_key] = v
state_dict = stripped_state_dict

if strict is None:
if strict:
# 1. filter out missing keys
filtered_state_dict = {k: v for k, v in state_dict.items() if k in model_dict}
unused = set(state_dict.keys()) - set(filtered_state_dict.keys())
Expand Down

0 comments on commit d07ff04

Please sign in to comment.