[−][src]Struct finalfrontier::SkipgramTrainer
Skipgram Trainer
The SkipgramTrainer
holds the information and logic necessary to transform a tokenized
sentence into an iterator of focus and context tuples. The struct is cheap to clone because
the vocabulary is shared between clones.
Methods
impl<R> SkipgramTrainer<ReseedOnCloneRng<R>> where
R: Rng + Clone + SeedableRng,
[src]
R: Rng + Clone + SeedableRng,
pub fn new(
vocab: SubwordVocab,
rng: R,
common_config: CommonConfig,
skipgram_config: SkipGramConfig
) -> Self
[src]
vocab: SubwordVocab,
rng: R,
common_config: CommonConfig,
skipgram_config: SkipGramConfig
) -> Self
Constructs a new SkipgramTrainer
.
Trait Implementations
impl<R> Trainer for SkipgramTrainer<R> where
R: Rng + Clone,
[src]
R: Rng + Clone,
type InputVocab = SubwordVocab
type Metadata = SkipgramMetadata<SubwordVocabConfig>
fn input_indices(&self, idx: usize) -> Vec<u64>
[src]
fn input_vocab(&self) -> &SubwordVocab
[src]
fn try_into_input_vocab(self) -> Result<SubwordVocab, 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) -> SkipgramMetadata<SubwordVocabConfig>
[src]
impl<R: Clone> Clone for SkipgramTrainer<R>
[src]
fn clone(&self) -> SkipgramTrainer<R>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<R> Send for SkipgramTrainer<R> where
R: Send,
R: Send,
impl<R> Sync for SkipgramTrainer<R> where
R: Sync,
R: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,