Update modeling_super_linear.py
Browse files- modeling_super_linear.py +2 -4
modeling_super_linear.py
CHANGED
|
@@ -228,11 +228,9 @@ class RLinear(nn.Module):
|
|
| 228 |
else:
|
| 229 |
W = self.Linear.weight.detach()
|
| 230 |
print(W.shape)
|
| 231 |
-
W_3d = W.
|
| 232 |
print(W_3d.shape)
|
| 233 |
-
|
| 234 |
-
print(W_pool.shape)
|
| 235 |
-
W_new = W_pool.squeeze(0).transpose(0, 1).contiguous()
|
| 236 |
print(W_new.shape)
|
| 237 |
self.zero_shot_Linear = W_new
|
| 238 |
|
|
|
|
| 228 |
else:
|
| 229 |
W = self.Linear.weight.detach()
|
| 230 |
print(W.shape)
|
| 231 |
+
W_3d = W.unsqueeze(0)
|
| 232 |
print(W_3d.shape)
|
| 233 |
+
W_new = F.adaptive_avg_pool1d(W_3d, new_lookback).squeeze(0)
|
|
|
|
|
|
|
| 234 |
print(W_new.shape)
|
| 235 |
self.zero_shot_Linear = W_new
|
| 236 |
|