Update modeling_super_linear.py
Browse files- modeling_super_linear.py +4 -10
modeling_super_linear.py
CHANGED
|
@@ -239,18 +239,12 @@ class RLinear(nn.Module):
|
|
| 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 = F.linear(x, self.zero_shot_Linear)
|
| 245 |
-
#x = self.Linear(x.permute(0,2,1)).permute(0,2,1)
|
| 246 |
-
return x + seq_last
|
| 247 |
-
|
| 248 |
#x = x * (x.shape[1]/512)
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
#x = x * (512/x.shape[1])
|
| 253 |
-
|
| 254 |
|
| 255 |
|
| 256 |
if len(x_shape) == 2:
|
|
|
|
| 239 |
#print(F"new Lookkback : {x.shape[1]}")
|
| 240 |
|
| 241 |
self.transform_model(x.shape[1],1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 242 |
#x = x * (x.shape[1]/512)
|
| 243 |
+
x = self.revin_layer(x, 'norm')
|
| 244 |
+
x = F.linear(x, self.zero_shot_Linear)
|
| 245 |
+
x = self.revin_layer(x, 'denorm')
|
| 246 |
#x = x * (512/x.shape[1])
|
| 247 |
+
return x
|
| 248 |
|
| 249 |
|
| 250 |
if len(x_shape) == 2:
|