Update modeling_super_linear.py
Browse files213 unmodified lines214215216217218219355 unmodified lines575576577578579580581582213 unmodified linesdef forward(self, x):# x: [Batch, Input length,Channel]x_shape = x.shapeif len(x_shape) == 2:x = x.unsqueeze(-1)355 unmodified lines# backbone expects (B, C, L)x_enc = inputs_embedsif x_enc.shape[1] < 512:x_enc = self.fourier_interp_dim1(x_enc)# backbone returns (B, pred_len, C)213 unmodified lines214215216217218219220221222223224225226227228229230231232233234235355 unmodified lines591592593594595596597598213 unmodified linesdef forward(self, x):# x: [Batch, Input length,Channel]x_shape = x.shapeif x.shape[1] < self.seq_len:if self.zero_shot_Linear is None:print(F"new Lookkback : {x.shape[1]}")self.transform_model(x.shape[1])if len(x_shape) == 2:x = x.unsqueeze(-1)x = x.clone()x = self.revin_layer(x, 'norm')x = F.linear(x.permute(0,2,1), self.zero_shot_Linear).permute(0,2,1).clone()x = self.revin_layer(x, 'denorm')if len(x_shape) == 2:x = x.squeeze(-1)return xif len(x_shape) == 2:x = x.unsqueeze(-1)355 unmodified lines# backbone expects (B, C, L)x_enc = inputs_embeds'''if x_enc.shape[1] < 512:x_enc = self.fourier_interp_dim1(x_enc)'''# backbone returns (B, pred_len, C)
modeling_super_linear.py+18-2