Skip to content

Commit

Permalink
Merge pull request #268 from fmartiescofet/fix_filter_weights
Browse files Browse the repository at this point in the history
Fix `state_dict` redefinition
  • Loading branch information
Joao-L-S-Almeida authored Dec 2, 2024
2 parents 12e434d + 789a468 commit 6df109e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terratorch/models/backbones/prithvi_vit.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def checkpoint_filter_fn_vit(
else:
clean_dict[k] = v

state_dict = clean_dict
state_dict = clean_dict

state_dict = select_patch_embed_weights(state_dict, model, pretrained_bands, model_bands)

Expand Down Expand Up @@ -93,7 +93,7 @@ def checkpoint_filter_fn_mae(
else:
clean_dict["encoder." + k] = v

state_dict = clean_dict
state_dict = clean_dict

state_dict = select_patch_embed_weights(state_dict, model, pretrained_bands, model_bands)

Expand Down

0 comments on commit 6df109e

Please sign in to comment.