| 1 | #include<LSTM.h> |
| 2 | |
| 3 | LSTM::LSTM(int in_features, int hidden_layer_size, int out_size, int num_layers, bool batch_first){ |
| 4 | lstm = torch::nn::LSTM(lstmOption(in_features, hidden_layer_size, num_layers, batch_first)); |
| 5 | ln = torch::nn::Linear(hidden_layer_size, out_size); |
| 6 | |
| 7 | lstm = register_module("lstm",lstm); |
| 8 | ln = register_module("ln",ln); |
| 9 | } |
| 10 | |
| 11 | torch::Tensor LSTM::forward(torch::Tensor x){ |
| 12 | auto lstm_out = lstm->forward(x); |
nothing calls this directly
no test coverage detected