Configuration class for Encoder module.
More...
Configuration class for Encoder module.
Provides a type-safe fluent interface for configuring Encoder modules.
◆ EncoderConfig()
Mila::Dnn::EncoderConfig::EncoderConfig |
( |
| ) |
|
|
default |
◆ getChannels()
size_t Mila::Dnn::EncoderConfig::getChannels |
( |
| ) |
const |
|
inline |
Get the configured embedding dimension.
- Returns
- size_t The embedding dimension
◆ getMaxSequenceLength()
size_t Mila::Dnn::EncoderConfig::getMaxSequenceLength |
( |
| ) |
const |
|
inline |
Get the configured maximum sequence length.
- Returns
- size_t The maximum sequence length
◆ getVocabularyLength()
size_t Mila::Dnn::EncoderConfig::getVocabularyLength |
( |
| ) |
const |
|
inline |
Get the configured vocabulary length.
- Returns
- size_t The vocabulary length
◆ validate()
void Mila::Dnn::EncoderConfig::validate |
( |
| ) |
const |
|
inlinevirtual |
Validate configuration parameters.
- Exceptions
-
std::invalid_argument | If validation fails |
Reimplemented from Mila::Dnn::ComponentConfig.
◆ withChannels()
EncoderConfig & Mila::Dnn::EncoderConfig::withChannels |
( |
size_t |
channels | ) |
|
|
inline |
Set the embedding dimension.
- Parameters
-
channels | The embedding dimension size |
- Returns
- EncoderConfig& Reference to this for method chaining
◆ withMaxSequenceLength()
EncoderConfig & Mila::Dnn::EncoderConfig::withMaxSequenceLength |
( |
size_t |
max_seq_len | ) |
|
|
inline |
Set the maximum sequence length.
- Parameters
-
max_seq_len | Maximum sequence length |
- Returns
- EncoderConfig& Reference to this for method chaining
◆ withVocabularyLength()
EncoderConfig & Mila::Dnn::EncoderConfig::withVocabularyLength |
( |
size_t |
vocab_len | ) |
|
|
inline |
Set the vocabulary length.
- Parameters
-
vocab_len | Size of the vocabulary |
- Returns
- EncoderConfig& Reference to this for method chaining
◆ channels_
size_t Mila::Dnn::EncoderConfig::channels_ = 0 |
|
private |
The embedding dimension size.
◆ max_seq_len_
size_t Mila::Dnn::EncoderConfig::max_seq_len_ = 512 |
|
private |
The maximum sequence length.
◆ vocab_len_
size_t Mila::Dnn::EncoderConfig::vocab_len_ = 50000 |
|
private |
The documentation for this class was generated from the following file: