MCPcopy Create free account
hub / github.com/BorealisAI/scaleformer / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

163
164class DataEmbedding_mine(nn.Module):
165 def __init__(self, c_in, d_model, embed_type='fixed', freq='h', dropout=0.1, is_decoder=False):
166 super(DataEmbedding_mine, self).__init__()
167 if is_decoder:
168 c_in += 1
169 self.value_embedding = TokenEmbedding(c_in=c_in, d_model=d_model)
170 self.position_embedding = PositionalEmbedding_new(d_model=d_model)
171 self.temporal_embedding = TimeFeatureEmbedding_new(d_model=d_model, embed_type=embed_type, freq=freq)
172 self.dropout = nn.Dropout(p=dropout)
173 self.is_decoder = is_decoder
174
175 def forward(self, x, x_mark, scale, first_scale, label_len):
176 if self.is_decoder:

Callers

nothing calls this directly

Calls 4

TokenEmbeddingClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected