Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 22, 2025
1 parent d123b6c commit 9560489
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tiatoolbox/models/architecture/vanilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,24 @@ def _get_timm_architecture(
init_values=1e-5,
dynamic_img_size=False,
)

if arch_name == "UNI2": # pragma: no cover
# UNI2-h tile encoder: https://huggingface.co/MahmoodLab/UNI2-h
# Coverage skipped timm API is tested using efficient U-Net.
timm_kwargs = {
'img_size': 224,
'patch_size': 14,
'depth': 24,
'num_heads': 24,
'init_values': 1e-5,
'embed_dim': 1536,
'mlp_ratio': 2.66667*2,
'num_classes': 0,
'no_embed_class': True,
'mlp_layer': timm.layers.SwiGLUPacked,
'act_layer': torch.nn.SiLU,
'reg_tokens': 8,
'dynamic_img_size': True
"img_size": 224,
"patch_size": 14,
"depth": 24,
"num_heads": 24,
"init_values": 1e-5,
"embed_dim": 1536,
"mlp_ratio": 2.66667 * 2,
"num_classes": 0,
"no_embed_class": True,
"mlp_layer": timm.layers.SwiGLUPacked,
"act_layer": torch.nn.SiLU,
"reg_tokens": 8,
"dynamic_img_size": True,
}
return timm.create_model(
"hf-hub:MahmoodLab/UNI2-h",
Expand Down

0 comments on commit 9560489

Please sign in to comment.