Fixing for lighteval
Browse files- modeling_ltgbert.py +2 -2
modeling_ltgbert.py
CHANGED
|
@@ -50,9 +50,9 @@ class DWAModules(torch.nn.Module):
|
|
| 50 |
self.n_blocks = n_blocks
|
| 51 |
self.alphas = nn.ParameterList([nn.Parameter(torch.zeros(i + 2)) for i in range(n_blocks)])
|
| 52 |
self.accumulator = None
|
| 53 |
-
self.
|
| 54 |
|
| 55 |
-
def
|
| 56 |
for module in self.alphas:
|
| 57 |
module.data.zero_()
|
| 58 |
module.data[-1] = 1.0
|
|
|
|
| 50 |
self.n_blocks = n_blocks
|
| 51 |
self.alphas = nn.ParameterList([nn.Parameter(torch.zeros(i + 2)) for i in range(n_blocks)])
|
| 52 |
self.accumulator = None
|
| 53 |
+
self._initialize_weights()
|
| 54 |
|
| 55 |
+
def _initialize_weights(self):
|
| 56 |
for module in self.alphas:
|
| 57 |
module.data.zero_()
|
| 58 |
module.data[-1] = 1.0
|