MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / lstmOption

Function lstmOption

lesson3-BasicModels/LSTM.h:8–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include<tuple>
7
8inline 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)

Callers 1

LSTMMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected