Skip to content

Commit

Permalink
Fix torchscript for vit-hybrid dynamic_resize
Browse files Browse the repository at this point in the history
  • Loading branch information
rwightman committed Aug 25, 2023
1 parent dd5e69f commit 64912a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion timm/models/vision_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD, \
OPENAI_CLIP_MEAN, OPENAI_CLIP_STD
from timm.layers import PatchEmbed, Mlp, DropPath, trunc_normal_, lecun_normal_, resample_patch_embed, \
resample_abs_pos_embed, resample_abs_pos_embed_nhwc, RmsNorm, PatchDropout, use_fused_attn, SwiGLUPacked
resample_abs_pos_embed, RmsNorm, PatchDropout, use_fused_attn, SwiGLUPacked
from ._builder import build_model_with_cfg
from ._manipulate import named_apply, checkpoint_seq, adapt_input_conv
from ._registry import generate_default_cfgs, register_model, register_model_deprecations
Expand Down
2 changes: 2 additions & 0 deletions timm/models/vision_transformer_hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class HybridEmbed(nn.Module):
""" CNN Feature Map Embedding
Extract feature map from CNN, flatten, project to embedding dim.
"""
output_fmt: Format

def __init__(
self,
backbone,
Expand Down

0 comments on commit 64912a8

Please sign in to comment.