2021-08-17 19:52:42 +08:00
|
|
|
# Copyright (c) OpenMMLab. All rights reserved.
|
2023-02-28 10:05:00 +08:00
|
|
|
from .attention import (BEiTAttention, ChannelMultiheadAttention,
|
|
|
|
CrossMultiheadAttention, LeAttention,
|
|
|
|
MultiheadAttention, PromptMultiheadAttention,
|
|
|
|
ShiftWindowMSA, WindowMSA, WindowMSAV2)
|
2022-06-01 15:29:30 +08:00
|
|
|
from .batch_augments import CutMix, Mixup, RandomBatchAugment, ResizeMix
|
2023-02-28 17:04:40 +08:00
|
|
|
from .batch_shuffle import batch_shuffle_ddp, batch_unshuffle_ddp
|
2020-06-15 16:42:15 +08:00
|
|
|
from .channel_shuffle import channel_shuffle
|
2023-02-28 15:59:17 +08:00
|
|
|
from .clip_generator_helper import build_clip_model
|
2023-02-28 17:04:40 +08:00
|
|
|
from .data_preprocessor import (ClsDataPreprocessor, SelfSupDataPreprocessor,
|
|
|
|
TwoNormDataPreprocessor, VideoDataPreprocessor)
|
|
|
|
from .ema import CosineEMA
|
2022-04-13 23:06:56 +08:00
|
|
|
from .embed import (HybridEmbed, PatchEmbed, PatchMerging, resize_pos_embed,
|
|
|
|
resize_relative_position_bias_table)
|
2021-07-07 11:55:53 +08:00
|
|
|
from .helpers import is_tracing, to_2tuple, to_3tuple, to_4tuple, to_ntuple
|
2020-06-30 15:50:36 +08:00
|
|
|
from .inverted_residual import InvertedResidual
|
2022-09-20 14:56:45 +08:00
|
|
|
from .layer_scale import LayerScale
|
2020-06-15 16:42:15 +08:00
|
|
|
from .make_divisible import make_divisible
|
2023-01-06 16:13:41 +08:00
|
|
|
from .norm import GRN, LayerNorm2d, build_norm_layer
|
2022-09-21 13:27:04 +08:00
|
|
|
from .position_encoding import (ConditionalPositionEncoding,
|
2023-02-28 10:05:00 +08:00
|
|
|
PositionEncodingFourier,
|
|
|
|
build_2d_sincos_position_embedding)
|
2023-03-27 14:32:26 +08:00
|
|
|
from .res_layer_extra_norm import ResLayerExtraNorm
|
2020-06-30 15:50:36 +08:00
|
|
|
from .se_layer import SELayer
|
2023-02-28 15:59:17 +08:00
|
|
|
from .vector_quantizer import NormEMAVectorQuantizer
|
2020-06-15 16:42:15 +08:00
|
|
|
|
2021-02-25 14:06:58 +08:00
|
|
|
__all__ = [
|
2023-03-06 16:53:15 +08:00
|
|
|
'channel_shuffle',
|
|
|
|
'make_divisible',
|
|
|
|
'InvertedResidual',
|
|
|
|
'SELayer',
|
|
|
|
'to_ntuple',
|
|
|
|
'to_2tuple',
|
|
|
|
'to_3tuple',
|
|
|
|
'to_4tuple',
|
|
|
|
'PatchEmbed',
|
|
|
|
'PatchMerging',
|
|
|
|
'HybridEmbed',
|
|
|
|
'RandomBatchAugment',
|
|
|
|
'ShiftWindowMSA',
|
|
|
|
'is_tracing',
|
|
|
|
'MultiheadAttention',
|
|
|
|
'ConditionalPositionEncoding',
|
|
|
|
'resize_pos_embed',
|
|
|
|
'resize_relative_position_bias_table',
|
|
|
|
'ClsDataPreprocessor',
|
|
|
|
'Mixup',
|
|
|
|
'CutMix',
|
|
|
|
'ResizeMix',
|
|
|
|
'BEiTAttention',
|
|
|
|
'LayerScale',
|
|
|
|
'WindowMSA',
|
|
|
|
'WindowMSAV2',
|
|
|
|
'ChannelMultiheadAttention',
|
|
|
|
'PositionEncodingFourier',
|
|
|
|
'LeAttention',
|
|
|
|
'GRN',
|
|
|
|
'LayerNorm2d',
|
|
|
|
'build_norm_layer',
|
|
|
|
'CrossMultiheadAttention',
|
|
|
|
'build_2d_sincos_position_embedding',
|
|
|
|
'PromptMultiheadAttention',
|
|
|
|
'NormEMAVectorQuantizer',
|
|
|
|
'build_clip_model',
|
|
|
|
'batch_shuffle_ddp',
|
|
|
|
'batch_unshuffle_ddp',
|
|
|
|
'SelfSupDataPreprocessor',
|
|
|
|
'TwoNormDataPreprocessor',
|
|
|
|
'VideoDataPreprocessor',
|
|
|
|
'CosineEMA',
|
2023-03-27 14:32:26 +08:00
|
|
|
'ResLayerExtraNorm',
|
2021-02-25 14:06:58 +08:00
|
|
|
]
|