MCPcopy Create free account
hub / github.com/Anoise/WTFlib / forward

Method forward

LDPS_Graph/models/NLinear.py:18–24  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

16 # self.Linear.weight = nn.Parameter((1/self.seq_len)*torch.ones([self.pred_len,self.seq_len]))
17
18 def forward(self, x):
19 # x: [Batch, Input length, Channel]
20 seq_last = x[:,-1:,:].detach()
21 x = x - seq_last
22 x = self.Linear(x.permute(0,2,1)).permute(0,2,1)
23 x = x + seq_last
24 return x # [Batch, Output length, Channel]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected