gmastrapas commited on
Commit
39e6a55
·
verified ·
1 Parent(s): 51f02de

fix for latest hf trasformer pretrained model initializer (#11)

Browse files

- adding _initialize_weights forwarding to _init_weights (163880b3c310160d3f0cfe51eb045679d644c74b)

Files changed (1) hide show
  1. eva_model.py +4 -0
eva_model.py CHANGED
@@ -691,6 +691,10 @@ class EVAVisionTransformer(nn.Module):
691
  nn.init.constant_(m.bias, 0)
692
  nn.init.constant_(m.weight, 1.0)
693
 
 
 
 
 
694
  def get_num_layers(self):
695
  return len(self.blocks)
696
 
 
691
  nn.init.constant_(m.bias, 0)
692
  nn.init.constant_(m.weight, 1.0)
693
 
694
+ @staticmethod
695
+ def _initialize_weights(m):
696
+ EVAVisionTransformer._init_weights(m)
697
+
698
  def get_num_layers(self):
699
  return len(self.blocks)
700