(self, x, edge_index, edge_attr)
| 79 | |
| 80 | |
| 81 | def forward(self, x, edge_index, edge_attr): # x: [Batch, Input length, Channel] |
| 82 | if self.decomposition: |
| 83 | res_init, trend_init = self.decomp_module(x) |
| 84 | res_init, trend_init = res_init.permute(0,2,1), trend_init.permute(0,2,1) # x: [Batch, Channel, Input length] |
| 85 | res = self.model_res(res_init) |
| 86 | trend = self.model_trend(trend_init) |
| 87 | x = res + trend |
| 88 | x = x.permute(0,2,1) # x: [Batch, Input length, Channel] |
| 89 | else: |
| 90 | #print(x.shape, edge_index.shape, edge_attr.shape) |
| 91 | # x: [1, Channel, Input length] |
| 92 | if len(x.shape)<3: |
| 93 | x = x.unsqueeze(0) |
| 94 | x = self.model(x, edge_index, edge_attr) |
| 95 | # x: [Batch, Input length, Channel] |
| 96 | # if len(x.shape)==3: |
| 97 | # x = x.squeeze(0) |
| 98 | return x |
nothing calls this directly
no outgoing calls
no test coverage detected