Update mci.py
Browse filesAdd _initialize_weights = _init_weights alias for backward compatibility with transformers <4.5
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)
|