kevin510 commited on
Commit
cf55c23
·
verified ·
1 Parent(s): 162b64f

Update mci.py

Browse files

Add _initialize_weights = _init_weights alias for backward compatibility with transformers <4.5

Files changed (1) hide show
  1. mci.py +2 -0
mci.py CHANGED
@@ -917,6 +917,8 @@ class ConvFFN(nn.Module):
917
  if m.bias is not None:
918
  nn.init.constant_(m.bias, 0)
919
 
 
 
920
  def forward(self, x: torch.Tensor) -> torch.Tensor:
921
  x = self.conv(x)
922
  x = self.fc1(x)
 
917
  if m.bias is not None:
918
  nn.init.constant_(m.bias, 0)
919
 
920
+ _initialize_weights = _init_weights
921
+
922
  def forward(self, x: torch.Tensor) -> torch.Tensor:
923
  x = self.conv(x)
924
  x = self.fc1(x)