Skip to content

Commit

Permalink
Fix duplicate init_weights call in ViT init function.
Browse files Browse the repository at this point in the history
  • Loading branch information
mzr1996 committed Jul 26, 2021
1 parent 474c55d commit f0d0b4f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mmcls/models/backbones/vision_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,6 @@ def __init__(self,
norm_cfg, embed_dim, postfix=1)
self.add_module(self.norm1_name, norm1)

self.init_weights()

def init_weights(self):
super(VisionTransformer, self).init_weights()
nn.init.normal_(self.pos_embed, std=0.02)
Expand Down

0 comments on commit f0d0b4f

Please sign in to comment.