(self, x)
| 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 | |
| 93 | class TimeFeatureEmbedding(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected