LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
deeplima::nets::torch_modules::PackedLSTMImpl Class Reference

#include </home/runner/work/lima/lima/deeplima/libs/nn/torch_modules/stanza_models_depparse_model.h>

Inheritance diagram for deeplima::nets::torch_modules::PackedLSTMImpl:

Public Member Functions

 PackedLSTMImpl ()=default
 
 PackedLSTMImpl (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::tuple< torch::Tensor, std::tuple< torch::Tensor, torch::Tensor > > forward (torch::Tensor input, torch::Tensor lengths, torch::optional< std::tuple< torch::Tensor, torch::Tensor > > hx={})
 
std::tuple< torch::nn::utils::rnn::PackedSequence, std::tuple< torch::Tensor, torch::Tensor > > forward_with_packed_input (const torch::nn::utils::rnn::PackedSequence &packed_input, torch::Tensor lengths, torch::optional< std::tuple< torch::Tensor, torch::Tensor > > hx={})
 

Public Attributes

torch::nn::AnyModule lstm
 
bool batch_first
 
bool pad
 

Detailed Description

Definition at line 233 of file stanza_models_depparse_model.h.

Constructor & Destructor Documentation

◆ PackedLSTMImpl() [1/2]

deeplima::nets::torch_modules::PackedLSTMImpl::PackedLSTMImpl ( )
default

◆ PackedLSTMImpl() [2/2]

deeplima::nets::torch_modules::PackedLSTMImpl::PackedLSTMImpl ( 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

Definition at line 237 of file stanza_models_depparse_model.h.

Member Function Documentation

◆ forward()

std::tuple< torch::Tensor, std::tuple< torch::Tensor, torch::Tensor > > deeplima::nets::torch_modules::PackedLSTMImpl::forward ( torch::Tensor  input,
torch::Tensor  lengths,
torch::optional< std::tuple< torch::Tensor, torch::Tensor > >  hx = {} 
)
inline

Definition at line 259 of file stanza_models_depparse_model.h.

◆ forward_with_packed_input()

std::tuple< torch::nn::utils::rnn::PackedSequence, std::tuple< torch::Tensor, torch::Tensor > > deeplima::nets::torch_modules::PackedLSTMImpl::forward_with_packed_input ( const torch::nn::utils::rnn::PackedSequence &  packed_input,
torch::Tensor  lengths,
torch::optional< std::tuple< torch::Tensor, torch::Tensor > >  hx = {} 
)
inline

Definition at line 270 of file stanza_models_depparse_model.h.

Member Data Documentation

◆ batch_first

bool deeplima::nets::torch_modules::PackedLSTMImpl::batch_first

Definition at line 297 of file stanza_models_depparse_model.h.

◆ lstm

torch::nn::AnyModule deeplima::nets::torch_modules::PackedLSTMImpl::lstm

Definition at line 296 of file stanza_models_depparse_model.h.

◆ pad

bool deeplima::nets::torch_modules::PackedLSTMImpl::pad

Definition at line 298 of file stanza_models_depparse_model.h.


The documentation for this class was generated from the following file: