mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Imports getting unwieldy in vision_transformer.py
This commit is contained in:
parent
1be7999993
commit
211cf90721
@ -39,11 +39,30 @@ import torch.nn as nn
|
||||
import torch.nn.functional as F
|
||||
from torch.jit import Final
|
||||
|
||||
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD, \
|
||||
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, AttentionPoolLatent, LayerNorm, RmsNorm, PatchDropout, \
|
||||
SwiGLUPacked, SwiGLU, trunc_normal_, lecun_normal_, resample_patch_embed, resample_abs_pos_embed, use_fused_attn, \
|
||||
get_act_layer, get_norm_layer, LayerType
|
||||
)
|
||||
from timm.layers import (
|
||||
PatchEmbed,
|
||||
Mlp,
|
||||
DropPath,
|
||||
AttentionPoolLatent,
|
||||
LayerNorm,
|
||||
RmsNorm,
|
||||
PatchDropout,
|
||||
SwiGLUPacked,
|
||||
SwiGLU,
|
||||
trunc_normal_,
|
||||
lecun_normal_,
|
||||
resample_patch_embed,
|
||||
resample_abs_pos_embed,
|
||||
use_fused_attn,
|
||||
get_act_layer,
|
||||
get_norm_layer,
|
||||
LayerType,
|
||||
)
|
||||
from ._builder import build_model_with_cfg
|
||||
from ._features import feature_take_indices
|
||||
from ._manipulate import named_apply, checkpoint_seq, adapt_input_conv
|
||||
|
Loading…
x
Reference in New Issue
Block a user