(self, x)
| 106 | self.month_embed = Embed(month_size, d_model) |
| 107 | |
| 108 | def forward(self, x): |
| 109 | x = x.long() |
| 110 | |
| 111 | minute_x = self.minute_embed(x[:, :, 4]) if hasattr(self, 'minute_embed') else 0. |
| 112 | hour_x = self.hour_embed(x[:, :, 3]) |
| 113 | weekday_x = self.weekday_embed(x[:, :, 2]) |
| 114 | day_x = self.day_embed(x[:, :, 1]) |
| 115 | month_x = self.month_embed(x[:, :, 0]) |
| 116 | |
| 117 | return hour_x + weekday_x + day_x + month_x + minute_x |
| 118 | |
| 119 | |
| 120 | class TimeFeatureEmbedding(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected