Skip to content

Commit

Permalink
typo + comment change
Browse files Browse the repository at this point in the history
  • Loading branch information
themachinefan committed Feb 9, 2024
1 parent 275bdf2 commit ba4240d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vit_prisma/prisma/loading_from_pretrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import einops

def convert_timm_weigthts(
def convert_timm_weights(
old_state_dict,
cfg: HookedViTConfig,
):
Expand Down Expand Up @@ -124,7 +124,7 @@ def get_pretrained_state_dict(
param.requires_grad = False

# state_dict = None # Conversion of state dict to HookedTransformer format
state_dict = convert_timm_weigthts(hf_model.state_dict(), cfg)
state_dict = convert_timm_weights(hf_model.state_dict(), cfg)

return state_dict

Expand Down Expand Up @@ -188,7 +188,7 @@ def convert_pretrained_model_config(model_name: str, is_timm: bool = True) -> Ho
'n_params' : sum(p.numel() for p in model.parameters() if p.requires_grad) if is_timm else None,
}

# Currently a bug getting configs, only this model works and still requires modification of eps
# Currently a bug getting configs, only this model confirmed to work and even it requires modification of eps
if is_timm and model_name == "vit_base_patch16_224":
pretrained_config.update({
"eps": 1e-6,
Expand Down

0 comments on commit ba4240d

Please sign in to comment.