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

Method forward

lesson3-BasicModels/LSTM.cpp:11–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9}
10
11torch::Tensor LSTM::forward(torch::Tensor x){
12 auto lstm_out = lstm->forward(x);
13 auto predictions = ln->forward(std::get<0>(lstm_out));
14 return predictions.select(1,-1);
15}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected