Skip to content

Commit 4d8ecde

Browse files
committed
Fix torchscript for vit-hybrid dynamic_resize
1 parent fdd8c7c commit 4d8ecde

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

timm/models/vision_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD, \
3939
OPENAI_CLIP_MEAN, OPENAI_CLIP_STD
4040
from timm.layers import PatchEmbed, Mlp, DropPath, trunc_normal_, lecun_normal_, resample_patch_embed, \
41-
resample_abs_pos_embed, resample_abs_pos_embed_nhwc, RmsNorm, PatchDropout, use_fused_attn, SwiGLUPacked
41+
resample_abs_pos_embed, RmsNorm, PatchDropout, use_fused_attn, SwiGLUPacked
4242
from ._builder import build_model_with_cfg
4343
from ._manipulate import named_apply, checkpoint_seq, adapt_input_conv
4444
from ._registry import generate_default_cfgs, register_model, register_model_deprecations

timm/models/vision_transformer_hybrid.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class HybridEmbed(nn.Module):
3131
""" CNN Feature Map Embedding
3232
Extract feature map from CNN, flatten, project to embedding dim.
3333
"""
34+
output_fmt: Format
35+
3436
def __init__(
3537
self,
3638
backbone,

0 commit comments

Comments
 (0)