MCPcopy Create free account
hub / github.com/thuml/Time-Series-Library / __init__

Method __init__

models/MSGNet.py:23–38  ·  view source on GitHub ↗
(self, configs)

Source from the content-addressed store, hash-verified

21
22class ScaleGraphBlock(nn.Module):
23 def __init__(self, configs):
24 super(ScaleGraphBlock, self).__init__()
25 self.seq_len = configs.seq_len
26 self.pred_len = configs.pred_len
27 self.k = configs.top_k
28
29 self.att0 = Attention_Block(configs.d_model, configs.d_ff,
30 n_heads=configs.n_heads, dropout=configs.dropout, activation="gelu")
31 self.norm = nn.LayerNorm(configs.d_model)
32 self.gelu = nn.GELU()
33 self.gconv = nn.ModuleList()
34 for i in range(self.k):
35 self.gconv.append(
36 GraphBlock(configs.c_out , configs.d_model , configs.conv_channel, configs.skip_channel,
37 configs.gcn_depth , configs.dropout, configs.propalpha ,configs.seq_len,
38 configs.node_dim))
39
40
41 def forward(self, x):

Callers

nothing calls this directly

Calls 3

Attention_BlockClass · 0.90
GraphBlockClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected