Update modeling_super_linear.py
Browse files- modeling_super_linear.py +6 -5
modeling_super_linear.py
CHANGED
|
@@ -239,11 +239,12 @@ class RLinear(nn.Module):
|
|
| 239 |
#print(F"new Lookkback : {x.shape[1]}")
|
| 240 |
|
| 241 |
self.transform_model(x.shape[1],1)
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
|
|
|
| 247 |
|
| 248 |
#x = x * (x.shape[1]/512)
|
| 249 |
#x = self.revin_layer(x, 'norm')
|
|
|
|
| 239 |
#print(F"new Lookkback : {x.shape[1]}")
|
| 240 |
|
| 241 |
self.transform_model(x.shape[1],1)
|
| 242 |
+
seq_last = x[:,-1:,:].detach()
|
| 243 |
+
x = x - seq_last
|
| 244 |
+
x = x.squeeze(-1)
|
| 245 |
+
x = F.linear(x, self.zero_shot_Linear).unsqueeze_(-1)
|
| 246 |
+
#x = self.Linear(x.permute(0,2,1)).permute(0,2,1)
|
| 247 |
+
return x + seq_last
|
| 248 |
|
| 249 |
#x = x * (x.shape[1]/512)
|
| 250 |
#x = self.revin_layer(x, 'norm')
|