(self, configs)
| 37 | """ |
| 38 | |
| 39 | def __init__(self, configs): |
| 40 | super(Model, self).__init__() |
| 41 | self.pred_len = configs.pred_len |
| 42 | self.pred_len = configs.pred_len |
| 43 | self.output_attention = configs.output_attention |
| 44 | |
| 45 | # Embedding |
| 46 | self.enc_embedding = DataEmbedding(configs.enc_in, configs.d_model, configs.embed, configs.freq, |
| 47 | configs.dropout) |
| 48 | # Encoder |
| 49 | self.encoder = Encoder( |
| 50 | [ |
| 51 | EncoderLayer( |
| 52 | ReformerLayer(None, configs.d_model, configs.n_heads, bucket_size=configs.bucket_size, |
| 53 | n_hashes=configs.n_hashes), |
| 54 | configs.d_model, |
| 55 | configs.d_ff, |
| 56 | dropout=configs.dropout, |
| 57 | activation=configs.activation |
| 58 | ) for l in range(configs.e_layers) |
| 59 | ], |
| 60 | norm_layer=torch.nn.LayerNorm(configs.d_model) |
| 61 | ) |
| 62 | self.projection = nn.Linear(configs.d_model, configs.c_out, bias=True) |
| 63 | |
| 64 | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, |
| 65 | enc_self_mask=None, dec_self_mask=None, dec_enc_mask=None): |
nothing calls this directly
no test coverage detected