LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
deeplima::convert_from_torch Namespace Reference

Functions

template<class V , class S >
void copy_vector (const torch::Tensor &src, V &dst)
 
template<class M , class S >
void copy_matrix (const torch::Tensor &src, M &dst)
 
template<class M , class V , class S = float>
void convert_module_from_torch (const torch::nn::LSTM &src, eigen_impl::params_bilstm_t< M, V > &dst)
 
template<class M , class V , class S = float>
void convert_module_from_torch (const torch::nn::Linear &src, eigen_impl::params_linear_t< M, V > &dst)
 
template<class M , class V , class S = float>
void convert_module_from_torch (const deeplima::nets::torch_modules::DeepBiaffineAttentionDecoder &src, deeplima::eigen_impl::params_deep_biaffine_attn_decoder_t< M, V > &dst)
 
template<class M , class V , class S = float>
void convert_module_from_torch (const deeplima::nets::torch_modules::DeepBiaffineAttentionLabelDecoder &src, deeplima::eigen_impl::params_deep_biaffine_attn_label_decoder_t< M, V > &dst)
 
template<class M , class S = float>
void convert_module_from_torch (const torch::nn::Embedding &src, std::shared_ptr< DictBase > sp_dict, EmbdDict< uint64_t, M > &dst)
 
template<class M , class S = float>
void convert_module_from_torch (const torch::nn::Embedding &src, std::shared_ptr< DictBase > sp_dict, EmbdDict< std::string, M > &dst)
 

Function Documentation

◆ convert_module_from_torch() [1/6]

template<class M , class V , class S = float>
void deeplima::convert_from_torch::convert_module_from_torch ( const deeplima::nets::torch_modules::DeepBiaffineAttentionDecoder &  src,
deeplima::eigen_impl::params_deep_biaffine_attn_decoder_t< M, V > &  dst 
)

Definition at line 82 of file convert_from_torch.h.

◆ convert_module_from_torch() [2/6]

template<class M , class V , class S = float>
void deeplima::convert_from_torch::convert_module_from_torch ( const deeplima::nets::torch_modules::DeepBiaffineAttentionLabelDecoder &  src,
deeplima::eigen_impl::params_deep_biaffine_attn_label_decoder_t< M, V > &  dst 
)

Definition at line 96 of file convert_from_torch.h.

◆ convert_module_from_torch() [3/6]

template<class M , class S = float>
void deeplima::convert_from_torch::convert_module_from_torch ( const torch::nn::Embedding &  src,
std::shared_ptr< DictBase >  sp_dict,
EmbdDict< std::string, M > &  dst 
)

Definition at line 140 of file convert_from_torch.h.

◆ convert_module_from_torch() [4/6]

template<class M , class S = float>
void deeplima::convert_from_torch::convert_module_from_torch ( const torch::nn::Embedding &  src,
std::shared_ptr< DictBase >  sp_dict,
EmbdDict< uint64_t, M > &  dst 
)

Definition at line 118 of file convert_from_torch.h.

◆ convert_module_from_torch() [5/6]

template<class M , class V , class S = float>
void deeplima::convert_from_torch::convert_module_from_torch ( const torch::nn::Linear &  src,
eigen_impl::params_linear_t< M, V > &  dst 
)

Definition at line 75 of file convert_from_torch.h.

◆ convert_module_from_torch() [6/6]

template<class M , class V , class S = float>
void deeplima::convert_from_torch::convert_module_from_torch ( const torch::nn::LSTM &  src,
eigen_impl::params_bilstm_t< M, V > &  dst 
)

Definition at line 49 of file convert_from_torch.h.

◆ copy_matrix()

template<class M , class S >
void deeplima::convert_from_torch::copy_matrix ( const torch::Tensor &  src,
M &  dst 
)

Definition at line 33 of file convert_from_torch.h.

◆ copy_vector()

template<class V , class S >
void deeplima::convert_from_torch::copy_vector ( const torch::Tensor &  src,
V &  dst 
)

Definition at line 22 of file convert_from_torch.h.