razmars commited on
Commit
519d3cf
·
verified ·
1 Parent(s): db059a6

Update modeling_super_linear.py

Browse files
Files changed (1) hide show
  1. modeling_super_linear.py +6 -2
modeling_super_linear.py CHANGED
@@ -226,10 +226,14 @@ class RLinear(nn.Module):
226
 
227
  self.zero_shot_Linear = new_W # shape (self.horizon, new_lookback)
228
  else:
229
- W = self.Linear.weight.detach()
230
- W_3d = W.t().unsqueeze(0)
 
 
231
  W_pool = F.adaptive_avg_pool1d(W_3d, output_size=new_lookback)
 
232
  W_new = W_pool.squeeze(0).permute(2, 0).contiguous()
 
233
  self.zero_shot_Linear = W_new
234
 
235
 
 
226
 
227
  self.zero_shot_Linear = new_W # shape (self.horizon, new_lookback)
228
  else:
229
+ W = self.Linear.weight.detach
230
+ print(W.shape)
231
+ W_3d = W.t().unsqueeze(0)
232
+ print(W_3d.shape)
233
  W_pool = F.adaptive_avg_pool1d(W_3d, output_size=new_lookback)
234
+ print(W_pool.shape)
235
  W_new = W_pool.squeeze(0).permute(2, 0).contiguous()
236
+ print(W_new.shape)
237
  self.zero_shot_Linear = W_new
238
 
239