mirror of
https://github.com/open-mmlab/mmselfsup.git
synced 2025-06-03 14:59:38 +08:00
* [Feature]: Add BEiT Support * [Fix]: fix bugs after update * [Fix]: fix bugs in backbone * [Refactor]: refactor config * [Feature]: Support BEiTv2 * [Fix]: Fix UT * [Fix]: rename some configs * [Fix]: fix beitv2neck * [Refactor]: refactor beitv2 * [Fix]: fix lint * refactor configs * refactor beitv2 * update configs * add dalle target generator * refactor for beitv1 * refactor rel_pos_bias of beit * update configs * update configs * update v1 configs * update v2 configs * refactoe layer decay * update unittest * fix lint * fix ut * add docstrings * rename * fix lint * add beit model and log links * fix lint * update according to review * update * update * update LearningRateDecayOptimWrapperConstructor related configs * update init and backbone * update neck and vqkd * refactor neck * fix lint * add some comments * fix typo Co-authored-by: 任琴 <PJLAB\renqin@shai14001114l.pjlab.org> Co-authored-by: fangyixiao18 <fangyx18@hotmail.com>
29 lines
865 B
Python
29 lines
865 B
Python
# model settings
|
|
model = dict(
|
|
type='BEiT',
|
|
backbone=dict(
|
|
type='BEiTViT',
|
|
arch='base',
|
|
patch_size=16,
|
|
drop_path_rate=0.1,
|
|
final_norm=True,
|
|
layer_scale_init_value=0.1,
|
|
init_cfg=[
|
|
dict(type='TruncNormal', std=0.02, layer='Linear'),
|
|
dict(type='TruncNormal', std=0.02, layer='Conv2d'),
|
|
dict(type='Constant', layer='LayerNorm', val=1.0, bias=0.0)
|
|
]),
|
|
neck=None,
|
|
head=dict(
|
|
type='BEiTV1Head',
|
|
embed_dims=768,
|
|
num_embed=8192,
|
|
loss=dict(type='BEiTLoss')),
|
|
target_generator=dict(
|
|
type='DALL-E',
|
|
init_cfg=dict(
|
|
type='Pretrained',
|
|
checkpoint= # noqa: E251
|
|
'https://download.openmmlab.com/mmselfsup/1.x/target_generator_ckpt/dalle_encoder.pth', # noqa: E501
|
|
)))
|