[−][src]Trait finalfrontier::Trainer
Trainer Trait.
Associated Types
type InputVocab: Vocab
type Metadata
Required methods
fn input_vocab(&self) -> &Self::InputVocab
Get the trainer's input vocabulary.
fn try_into_input_vocab(self) -> Result<Self::InputVocab, Error>
Destruct the trainer and get the input vocabulary.
fn n_input_types(&self) -> usize
Get the number of possible input types.
In a model with subword units this value is calculated as:
2^n_buckets + input_vocab.len()
.
fn n_output_types(&self) -> usize
Get the number of possible outputs.
In a structured skipgram model this value is calculated as:
output_vocab.len() * context_size * 2
fn config(&self) -> &CommonConfig
Get this Trainer's common hyperparameters.
fn to_metadata(&self) -> Self::Metadata
Get this Trainer's configuration.
Implementors
impl<R, V> Trainer for DepembedsTrainer<R, V> where
R: Rng,
V: Vocab,
V::Config: Serialize,
[src]
R: Rng,
V: Vocab,
V::Config: Serialize,
type InputVocab = V
type Metadata = DepembedsMetadata<V::Config, SimpleVocabConfig>
fn input_vocab(&self) -> &Self::InputVocab
[src]
fn try_into_input_vocab(self) -> Result<Self::InputVocab, Error>
[src]
fn n_input_types(&self) -> usize
[src]
fn n_output_types(&self) -> usize
[src]
fn config(&self) -> &CommonConfig
[src]
fn to_metadata(&self) -> Self::Metadata
[src]
impl<R, V> Trainer for SkipgramTrainer<R, V> where
R: Rng + Clone,
V: Vocab,
V::Config: Serialize,
[src]
R: Rng + Clone,
V: Vocab,
V::Config: Serialize,