| 6 | #include<tuple> |
| 7 | |
| 8 | inline torch::nn::LSTMOptions lstmOption(int in_features, int hidden_layer_size, int num_layers, bool batch_first = false, bool bidirectional = false){ |
| 9 | torch::nn::LSTMOptions lstmOption = torch::nn::LSTMOptions(in_features, hidden_layer_size); |
| 10 | lstmOption.num_layers(num_layers).batch_first(batch_first).bidirectional(bidirectional); |
| 11 | return lstmOption; |
| 12 | } |
| 13 | |
| 14 | |
| 15 | //batch_first: true for io(batch, seq, feature) else io(seq, batch, feature) |