Skip to content

Commit

Permalink
This key could not be a tuple
Browse files Browse the repository at this point in the history
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
  • Loading branch information
Joao-L-S-Almeida committed Jan 7, 2025
1 parent 69a60ae commit bf0e870
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion terratorch/models/backbones/select_patch_embed_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def select_patch_embed_weights(
raise Exception(msg)

# extract the single element from the set
(patch_embed_proj_weight_key,) = patch_embed_proj_weight_key
if isinstance(patch_embed_proj_weight_key, tuple):
(patch_embed_proj_weight_key,) = patch_embed_proj_weight_key

patch_embed_weight = state_dict[patch_embed_proj_weight_key]

temp_weight = model.state_dict()[patch_embed_proj_weight_key].clone()
Expand Down

0 comments on commit bf0e870

Please sign in to comment.