razmars commited on
Commit
655408c
·
verified ·
1 Parent(s): ef06da2

Update modeling_super_linear.py

Browse files
Files changed (1) hide show
  1. modeling_super_linear.py +4 -5
modeling_super_linear.py CHANGED
@@ -219,14 +219,13 @@ class RLinear(nn.Module):
219
  #print(F"new Lookkback : {x.shape[1]}")
220
  self.transform_model(x.shape[1])
221
 
222
- if len(x_shape) == 2:
223
- x = x.unsqueeze(-1)
224
  x = x.clone()
 
225
  x = self.revin_layer(x, 'norm')
226
- x = F.linear(x.permute(0,2,1), self.zero_shot_Linear).permute(0,2,1).clone()
227
  x = self.revin_layer(x, 'denorm')
228
- if len(x_shape) == 2:
229
- x = x.squeeze(-1)
230
  return x
231
 
232
 
 
219
  #print(F"new Lookkback : {x.shape[1]}")
220
  self.transform_model(x.shape[1])
221
 
222
+
 
223
  x = x.clone()
224
+ x = x * (x.shape[1]/512)
225
  x = self.revin_layer(x, 'norm')
226
+ x = F.linear(x, self.zero_shot_Linear)
227
  x = self.revin_layer(x, 'denorm')
228
+ x = x * (512/x.shape[1])
 
229
  return x
230
 
231