Update modeling_super_linear.py
Browse files- modeling_super_linear.py +2 -2
modeling_super_linear.py
CHANGED
|
@@ -206,7 +206,7 @@ class RLinear(nn.Module):
|
|
| 206 |
original_norm = torch.norm(W, p=2)
|
| 207 |
new_norm = torch.norm(new_W, p=2)
|
| 208 |
final_scaling = original_norm / new_norm if new_norm.item() != 0 else 1.0
|
| 209 |
-
|
| 210 |
new_W = new_W * final_scaling
|
| 211 |
self.zero_shot_Linear = new_W
|
| 212 |
|
|
@@ -640,7 +640,7 @@ class SuperLinearForCausalLM(PreTrainedModel, GenerationMixin):
|
|
| 640 |
x_enc = self.revin_layer(x_enc, 'norm')
|
| 641 |
x_enc = self.fourier_interp_dim1(x_enc)
|
| 642 |
|
| 643 |
-
self.backbone.inf_pred_len =
|
| 644 |
|
| 645 |
# backbone returns (B, pred_len, C)
|
| 646 |
|
|
|
|
| 206 |
original_norm = torch.norm(W, p=2)
|
| 207 |
new_norm = torch.norm(new_W, p=2)
|
| 208 |
final_scaling = original_norm / new_norm if new_norm.item() != 0 else 1.0
|
| 209 |
+
final_scaling = 1
|
| 210 |
new_W = new_W * final_scaling
|
| 211 |
self.zero_shot_Linear = new_W
|
| 212 |
|
|
|
|
| 640 |
x_enc = self.revin_layer(x_enc, 'norm')
|
| 641 |
x_enc = self.fourier_interp_dim1(x_enc)
|
| 642 |
|
| 643 |
+
self.backbone.inf_pred_len = 192
|
| 644 |
|
| 645 |
# backbone returns (B, pred_len, C)
|
| 646 |
|