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

Method forward

LDPS_Graph/layers/Embed.py:81–90  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

79 self.month_embed = Embed(month_size, d_model)
80
81 def forward(self, x):
82 x = x.long()
83
84 minute_x = self.minute_embed(x[:, :, 4]) if hasattr(self, 'minute_embed') else 0.
85 hour_x = self.hour_embed(x[:, :, 3])
86 weekday_x = self.weekday_embed(x[:, :, 2])
87 day_x = self.day_embed(x[:, :, 1])
88 month_x = self.month_embed(x[:, :, 0])
89
90 return hour_x + weekday_x + day_x + month_x + minute_x
91
92
93class TimeFeatureEmbedding(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected