Update modeling_super_linear.py
Browse files210 unmodified lines211212213214215216214215216217218219220221222223224225226227210 unmodified lines
self.zero_shot_Linear = new_W else: W = self.Linear.weight.detach() new_W = F.interpolate(W.unsqueeze(-1), size=(new_lookback, self.horizon ), mode='bilinear', align_corners=False).squeeze(-1) self.zero_shot_Linear = new_W W4d = W.unsqueeze(0).unsqueeze(0) # (1, 1, out, in)
# resize H → self.horizon and W → new_lookback new_W = F.interpolate( W4d, size=(self.horizon, new_lookback), # (H_out, W_out) mode='bilinear', align_corners=False )[0, 0] # drop the two singleton dims
self.zero_shot_Linear = new_W # shape (self.horizon, new_lookback)
modeling_super_linear.py+11-3