Skip to content

Commit 211cf90

Browse files
committed
Imports getting unwieldy in vision_transformer.py
1 parent 1be7999 commit 211cf90

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

timm/models/vision_transformer.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,30 @@
3939
import torch.nn.functional as F
4040
from torch.jit import Final
4141

42-
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD, \
42+
from timm.data import (
43+
IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD,
44+
IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD,
4345
OPENAI_CLIP_MEAN, OPENAI_CLIP_STD
44-
from timm.layers import PatchEmbed, Mlp, DropPath, AttentionPoolLatent, LayerNorm, RmsNorm, PatchDropout, \
45-
SwiGLUPacked, SwiGLU, trunc_normal_, lecun_normal_, resample_patch_embed, resample_abs_pos_embed, use_fused_attn, \
46-
get_act_layer, get_norm_layer, LayerType
46+
)
47+
from timm.layers import (
48+
PatchEmbed,
49+
Mlp,
50+
DropPath,
51+
AttentionPoolLatent,
52+
LayerNorm,
53+
RmsNorm,
54+
PatchDropout,
55+
SwiGLUPacked,
56+
SwiGLU,
57+
trunc_normal_,
58+
lecun_normal_,
59+
resample_patch_embed,
60+
resample_abs_pos_embed,
61+
use_fused_attn,
62+
get_act_layer,
63+
get_norm_layer,
64+
LayerType,
65+
)
4766
from ._builder import build_model_with_cfg
4867
from ._features import feature_take_indices
4968
from ._manipulate import named_apply, checkpoint_seq, adapt_input_conv

0 commit comments

Comments
 (0)