MCPcopy Create free account
hub / github.com/KimMeen/Time-LLM / __init__

Method __init__

layers/Embed.py:161–175  ·  view source on GitHub ↗
(self, d_model, patch_len, stride, dropout)

Source from the content-addressed store, hash-verified

159
160class PatchEmbedding(nn.Module):
161 def __init__(self, d_model, patch_len, stride, dropout):
162 super(PatchEmbedding, self).__init__()
163 # Patching
164 self.patch_len = patch_len
165 self.stride = stride
166 self.padding_patch_layer = ReplicationPad1d((0, stride))
167
168 # Backbone, Input encoding: projection of feature vectors onto a d-dim vector space
169 self.value_embedding = TokenEmbedding(patch_len, d_model)
170
171 # Positional embedding
172 # self.position_embedding = PositionalEmbedding(d_model)
173
174 # Residual dropout
175 self.dropout = nn.Dropout(dropout)
176
177 def forward(self, x):
178 # do patching

Callers

nothing calls this directly

Calls 3

ReplicationPad1dClass · 0.85
TokenEmbeddingClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected