MCPcopy Create free account
hub / github.com/kwuking/TimeMixer / __init__

Method __init__

layers/Embed.py:139–147  ·  view source on GitHub ↗
(self, c_in, d_model, embed_type='fixed', freq='h', dropout=0.1)

Source from the content-addressed store, hash-verified

137
138class DataEmbedding_ms(nn.Module):
139 def __init__(self, c_in, d_model, embed_type='fixed', freq='h', dropout=0.1):
140 super(DataEmbedding_ms, self).__init__()
141
142 self.value_embedding = TokenEmbedding(c_in=1, d_model=d_model)
143 self.position_embedding = PositionalEmbedding(d_model=d_model)
144 self.temporal_embedding = TemporalEmbedding(d_model=d_model, embed_type=embed_type,
145 freq=freq) if embed_type != 'timeF' else TimeFeatureEmbedding(
146 d_model=d_model, embed_type=embed_type, freq=freq)
147 self.dropout = nn.Dropout(p=dropout)
148
149 def forward(self, x, x_mark):
150 B, T, N = x.shape

Callers

nothing calls this directly

Calls 5

TokenEmbeddingClass · 0.85
PositionalEmbeddingClass · 0.85
TemporalEmbeddingClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected