Skip to content

Commit

Permalink
add spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
gau-nernst committed Aug 8, 2023
1 parent 15e7878 commit 417d1d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vision_toolbox/backbones/mlp_mixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def from_config(variant: str, patch_size: int, img_size: int, pretrained: bool =
# Table 1 in https://arxiv.org/pdf/2105.01601.pdf
n_layers, d_model = dict(S=(8, 512), B=(12, 768), L=(24, 1024), H=(32, 1280))[variant]
m = MLPMixer(n_layers, d_model, patch_size, img_size)

if pretrained:
ckpt = {
("S", 8): "gsam/Mixer-S_8.npz",
Expand All @@ -86,6 +87,7 @@ def from_config(variant: str, patch_size: int, img_size: int, pretrained: bool =
}[(variant, patch_size)]
base_url = "https://storage.googleapis.com/mixer_models/"
m.load_jax_weights(torch_hub_download(base_url + ckpt))

return m

@torch.no_grad()
Expand Down

0 comments on commit 417d1d2

Please sign in to comment.