An LSTM implementation that supports recurrent dropout.
More...
#include </home/runner/work/lima/lima/deeplima/libs/nn/torch_modules/stanza_models_depparse_model.h>
|
| | LSTMwRecDropoutImpl ()=default |
| |
| | LSTMwRecDropoutImpl (int64_t input_size, int64_t hidden_size, int64_t num_layers, bool bias=true, bool batch_first=false, float dropout=0, bool bidirectional=false, bool pad=false, float rec_dropout=0) |
| |
| std::pair< torch::Tensor, std::pair< torch::Tensor, torch::Tensor > > | rnn_loop (torch::Tensor x, torch::Tensor batch_sizes, torch::nn::LSTMCellImpl *cell, std::vector< torch::Tensor > inits, bool reverse=false) |
| | RNN loop for one layer in one direction with recurrent dropout Assumes input is PackedSequence, returns PackedSequence as well.
|
| |
| std::tuple< torch::nn::utils::rnn::PackedSequence, std::tuple< torch::Tensor, torch::Tensor > > | forward (torch::nn::utils::rnn::PackedSequence input, torch::optional< std::tuple< torch::Tensor, torch::Tensor > > hx={}) |
| |
An LSTM implementation that supports recurrent dropout.
Definition at line 68 of file stanza_models_depparse_model.h.
◆ LSTMwRecDropoutImpl() [1/2]
| deeplima::nets::torch_modules::LSTMwRecDropoutImpl::LSTMwRecDropoutImpl |
( |
| ) |
|
|
default |
◆ LSTMwRecDropoutImpl() [2/2]
| deeplima::nets::torch_modules::LSTMwRecDropoutImpl::LSTMwRecDropoutImpl |
( |
int64_t |
input_size, |
|
|
int64_t |
hidden_size, |
|
|
int64_t |
num_layers, |
|
|
bool |
bias = true, |
|
|
bool |
batch_first = false, |
|
|
float |
dropout = 0, |
|
|
bool |
bidirectional = false, |
|
|
bool |
pad = false, |
|
|
float |
rec_dropout = 0 |
|
) |
| |
|
inline |
◆ forward()
| std::tuple< torch::nn::utils::rnn::PackedSequence, std::tuple< torch::Tensor, torch::Tensor > > deeplima::nets::torch_modules::LSTMwRecDropoutImpl::forward |
( |
torch::nn::utils::rnn::PackedSequence |
input, |
|
|
torch::optional< std::tuple< torch::Tensor, torch::Tensor > > |
hx = {} |
|
) |
| |
|
inline |
◆ rnn_loop()
| std::pair< torch::Tensor, std::pair< torch::Tensor, torch::Tensor > > deeplima::nets::torch_modules::LSTMwRecDropoutImpl::rnn_loop |
( |
torch::Tensor |
x, |
|
|
torch::Tensor |
batch_sizes, |
|
|
torch::nn::LSTMCellImpl * |
cell, |
|
|
std::vector< torch::Tensor > |
inits, |
|
|
bool |
reverse = false |
|
) |
| |
|
inline |
RNN loop for one layer in one direction with recurrent dropout Assumes input is PackedSequence, returns PackedSequence as well.
Definition at line 96 of file stanza_models_depparse_model.h.
◆ batch_first
| bool deeplima::nets::torch_modules::LSTMwRecDropoutImpl::batch_first |
◆ cells
| torch::nn::ModuleList deeplima::nets::torch_modules::LSTMwRecDropoutImpl::cells |
◆ drop
| torch::nn::Dropout deeplima::nets::torch_modules::LSTMwRecDropoutImpl::drop |
◆ dropout
| float deeplima::nets::torch_modules::LSTMwRecDropoutImpl::dropout |
◆ hidden_size
| int64_t deeplima::nets::torch_modules::LSTMwRecDropoutImpl::hidden_size |
◆ num_directions
| int64_t deeplima::nets::torch_modules::LSTMwRecDropoutImpl::num_directions |
◆ num_layers
| int64_t deeplima::nets::torch_modules::LSTMwRecDropoutImpl::num_layers |
◆ pad
| bool deeplima::nets::torch_modules::LSTMwRecDropoutImpl::pad |
◆ rec_drop
| torch::nn::Dropout deeplima::nets::torch_modules::LSTMwRecDropoutImpl::rec_drop |
The documentation for this class was generated from the following file: