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

Highway LSTM network, does NOT use the HLSTMCell above A Highway LSTM network, as used in the original Tensorflow version of the Dozat parser. More...

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

Inheritance diagram for deeplima::nets::torch_modules::HighwayLSTMImpl:

Public Member Functions

 HighwayLSTMImpl ()=default
 
 HighwayLSTMImpl (int64_t input_size, int64_t hidden_size, int64_t num_layers=1, bool bias=true, bool batch_first=false, float dropout=0, bool bidirectional=false, float rec_dropout=0, std::function< torch::Tensor(const torch::Tensor &)> highway_func=nullptr, bool pad=false)
 
std::tuple< torch::Tensor, std::tuple< torch::Tensor, torch::Tensor > > forward (torch::Tensor input, torch::Tensor seqlens, std::tuple< torch::Tensor, torch::Tensor > hx={torch::Tensor(), torch::Tensor()})
 

Public Attributes

int64_t input_size
 
int64_t hidden_size
 
int64_t num_layers
 
bool bias
 
bool batch_first
 
float dropout
 
bool bidirectional
 
int64_t num_directions
 
std::function< torch::Tensor(const torch::Tensor &)> highway_func
 
bool pad
 
torch::nn::ModuleList lstm
 
torch::nn::ModuleList highway
 
torch::nn::ModuleList gate
 
torch::nn::Dropout drop
 

Detailed Description

Highway LSTM network, does NOT use the HLSTMCell above A Highway LSTM network, as used in the original Tensorflow version of the Dozat parser.

Note that this is independent from the HLSTMCell above.

Definition at line 305 of file stanza_models_depparse_model.h.

Constructor & Destructor Documentation

◆ HighwayLSTMImpl() [1/2]

deeplima::nets::torch_modules::HighwayLSTMImpl::HighwayLSTMImpl ( )
default

◆ HighwayLSTMImpl() [2/2]

deeplima::nets::torch_modules::HighwayLSTMImpl::HighwayLSTMImpl ( int64_t  input_size,
int64_t  hidden_size,
int64_t  num_layers = 1,
bool  bias = true,
bool  batch_first = false,
float  dropout = 0,
bool  bidirectional = false,
float  rec_dropout = 0,
std::function< torch::Tensor(const torch::Tensor &)>  highway_func = nullptr,
bool  pad = false 
)
inline

Definition at line 309 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::HighwayLSTMImpl::forward ( torch::Tensor  input,
torch::Tensor  seqlens,
std::tuple< torch::Tensor, torch::Tensor >  hx = {torch::Tensor(),torch::Tensor()} 
)
inline

Definition at line 344 of file stanza_models_depparse_model.h.

Member Data Documentation

◆ batch_first

bool deeplima::nets::torch_modules::HighwayLSTMImpl::batch_first

Definition at line 392 of file stanza_models_depparse_model.h.

◆ bias

bool deeplima::nets::torch_modules::HighwayLSTMImpl::bias

Definition at line 391 of file stanza_models_depparse_model.h.

◆ bidirectional

bool deeplima::nets::torch_modules::HighwayLSTMImpl::bidirectional

Definition at line 395 of file stanza_models_depparse_model.h.

◆ drop

torch::nn::Dropout deeplima::nets::torch_modules::HighwayLSTMImpl::drop

Definition at line 403 of file stanza_models_depparse_model.h.

◆ dropout

float deeplima::nets::torch_modules::HighwayLSTMImpl::dropout

Definition at line 393 of file stanza_models_depparse_model.h.

◆ gate

torch::nn::ModuleList deeplima::nets::torch_modules::HighwayLSTMImpl::gate

Definition at line 402 of file stanza_models_depparse_model.h.

◆ hidden_size

int64_t deeplima::nets::torch_modules::HighwayLSTMImpl::hidden_size

Definition at line 389 of file stanza_models_depparse_model.h.

◆ highway

torch::nn::ModuleList deeplima::nets::torch_modules::HighwayLSTMImpl::highway

Definition at line 401 of file stanza_models_depparse_model.h.

◆ highway_func

std::function<torch::Tensor(const torch::Tensor&)> deeplima::nets::torch_modules::HighwayLSTMImpl::highway_func

Definition at line 397 of file stanza_models_depparse_model.h.

◆ input_size

int64_t deeplima::nets::torch_modules::HighwayLSTMImpl::input_size

Definition at line 388 of file stanza_models_depparse_model.h.

◆ lstm

torch::nn::ModuleList deeplima::nets::torch_modules::HighwayLSTMImpl::lstm

Definition at line 400 of file stanza_models_depparse_model.h.

◆ num_directions

int64_t deeplima::nets::torch_modules::HighwayLSTMImpl::num_directions

Definition at line 396 of file stanza_models_depparse_model.h.

◆ num_layers

int64_t deeplima::nets::torch_modules::HighwayLSTMImpl::num_layers

Definition at line 390 of file stanza_models_depparse_model.h.

◆ pad

bool deeplima::nets::torch_modules::HighwayLSTMImpl::pad

Definition at line 398 of file stanza_models_depparse_model.h.


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