|
37 | 37 | # def forward(self, x):
|
38 | 38 | # # x: [Batch, Input length, Channel]
|
39 | 39 | #
|
40 |
| -# x = x.permute(0,2,1) # (B,L,C)=》(B,C,L) |
| 40 | +# x = x.permute(0,2,1) # (B,L,C)->(B,C,L) |
41 | 41 | # b, c, l = x.size() # (B,C,L)
|
42 |
| -# y = self.avg_pool(x).view(b, c) # (B,C,L) 通过avg=》 (B,C,1) |
| 42 | +# y = self.avg_pool(x).view(b, c) # (B,C,L) |
43 | 43 |
|
44 | 44 |
|
45 | 45 | # # np.save('f_weight.npy', f_weight_np)
|
@@ -88,7 +88,7 @@ def __init__(self,configs,channel=96,ratio=1):
|
88 | 88 | self.Linear = nn.Linear(self.seq_len, self.pred_len)
|
89 | 89 | self.Linear_1 = nn.Linear(self.seq_len, self.pred_len)
|
90 | 90 | # self.dct_norm = nn.LayerNorm([self.channel_num], eps=1e-6)
|
91 |
| - self.dct_norm = nn.LayerNorm(self.seq_len, eps=1e-6)# |
| 91 | + self.dct_norm = nn.LayerNorm(self.seq_len, eps=1e-6) |
92 | 92 | # self.my_layer_norm = nn.LayerNorm([96], eps=1e-6)
|
93 | 93 | def forward(self, x):
|
94 | 94 | x = x.permute(0,2,1) # (B,L,C)=》(B,C,L)#forL
|
@@ -135,13 +135,7 @@ def forward(self, x):
|
135 | 135 | # np.save('f_weight.npy', f_weight_np)
|
136 | 136 | # x = x.permute(0,2,1)
|
137 | 137 | # result = self.Linear((x *(f_weight_inverse)))#forL
|
138 |
| - result = self.Linear((x *(f_weight)))#forL |
139 |
| - |
140 |
| - # result = result + (1)*torch.mean(result)# for ill |
141 |
| - # result_1 = self.Linear_1(x) |
142 |
| - # result = result + result_1 |
143 |
| - # result = self.my_layer_norm(result) |
144 |
| - |
| 138 | + result = self.Linear((x *(f_weight)))#forL |
145 | 139 | return result.permute(0,2,1)
|
146 | 140 |
|
147 | 141 |
|
|
0 commit comments