Skip to content

Commit c672230

Browse files
authored
Revert vit_h_14 as it breaks our CI (#5259)
1 parent 4bf6c6e commit c672230

File tree

5 files changed

+0
-47
lines changed

5 files changed

+0
-47
lines changed

docs/source/models.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ You can construct a model with random weights by calling its constructor:
8989
vit_b_32 = models.vit_b_32()
9090
vit_l_16 = models.vit_l_16()
9191
vit_l_32 = models.vit_l_32()
92-
vit_h_14 = models.vit_h_14()
9392
9493
We provide pre-trained models, using the PyTorch :mod:`torch.utils.model_zoo`.
9594
These can be constructed by passing ``pretrained=True``:
@@ -464,7 +463,6 @@ VisionTransformer
464463
vit_b_32
465464
vit_l_16
466465
vit_l_32
467-
vit_h_14
468466

469467
Quantized Models
470468
----------------

hubconf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,4 @@
6363
vit_b_32,
6464
vit_l_16,
6565
vit_l_32,
66-
vit_h_14,
6766
)
-939 Bytes
Binary file not shown.

torchvision/models/vision_transformer.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"vit_b_32",
1616
"vit_l_16",
1717
"vit_l_32",
18-
"vit_h_14",
1918
]
2019

2120
model_urls = {
@@ -357,26 +356,6 @@ def vit_l_32(pretrained: bool = False, progress: bool = True, **kwargs: Any) ->
357356
)
358357

359358

360-
def vit_h_14(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> VisionTransformer:
361-
"""
362-
Constructs a vit_h_14 architecture from
363-
`"An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale" <https://arxiv.org/abs/2010.11929>`_.
364-
365-
NOTE: Pretrained weights are not available for this model.
366-
"""
367-
return _vision_transformer(
368-
arch="vit_h_14",
369-
patch_size=14,
370-
num_layers=32,
371-
num_heads=16,
372-
hidden_dim=1280,
373-
mlp_dim=5120,
374-
pretrained=pretrained,
375-
progress=progress,
376-
**kwargs,
377-
)
378-
379-
380359
def interpolate_embeddings(
381360
image_size: int,
382361
patch_size: int,

torchvision/prototype/models/vision_transformer.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919
"ViT_B_32_Weights",
2020
"ViT_L_16_Weights",
2121
"ViT_L_32_Weights",
22-
"ViT_H_14_Weights",
2322
"vit_b_16",
2423
"vit_b_32",
2524
"vit_l_16",
2625
"vit_l_32",
27-
"vit_h_14",
2826
]
2927

3028

@@ -105,11 +103,6 @@ class ViT_L_32_Weights(WeightsEnum):
105103
default = ImageNet1K_V1
106104

107105

108-
class ViT_H_14_Weights(WeightsEnum):
109-
# Weights are not available yet.
110-
pass
111-
112-
113106
def _vision_transformer(
114107
patch_size: int,
115108
num_layers: int,
@@ -203,19 +196,3 @@ def vit_l_32(*, weights: Optional[ViT_L_32_Weights] = None, progress: bool = Tru
203196
progress=progress,
204197
**kwargs,
205198
)
206-
207-
208-
@handle_legacy_interface(weights=("pretrained", None))
209-
def vit_h_14(*, weights: Optional[ViT_H_14_Weights] = None, progress: bool = True, **kwargs: Any) -> VisionTransformer:
210-
weights = ViT_H_14_Weights.verify(weights)
211-
212-
return _vision_transformer(
213-
patch_size=14,
214-
num_layers=32,
215-
num_heads=16,
216-
hidden_dim=1280,
217-
mlp_dim=5120,
218-
weights=weights,
219-
progress=progress,
220-
**kwargs,
221-
)

0 commit comments

Comments
 (0)