remove useless modification

pull/1758/head
hmtbgc 2023-09-13 12:57:52 +08:00
parent a8b2f93634
commit 120ef98853
1 changed files with 1 additions and 1 deletions
mmpretrain/models/backbones

View File

@ -384,7 +384,7 @@ class VisionTransformer(BaseBackbone):
super(VisionTransformer, self).init_weights()
if not (isinstance(self.init_cfg, dict)
and self.init_cfg['type'] == 'Pretrained' or self.is_init):
and self.init_cfg['type'] == 'Pretrained'):
if self.pos_embed is not None:
trunc_normal_(self.pos_embed, std=0.02)