[][src]Struct finalfrontier::SkipgramTrainer

pub struct SkipgramTrainer<R, V> { /* fields omitted */ }

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, V> SkipgramTrainer<ReseedOnCloneRng<R>, V> where
    R: Rng + Clone + SeedableRng,
    V: Vocab
[src]

pub fn new(
    vocab: V,
    rng: R,
    common_config: CommonConfig,
    skipgram_config: SkipGramConfig
) -> Self
[src]

Constructs a new SkipgramTrainer.

Trait Implementations

impl<R, V> Trainer for SkipgramTrainer<R, V> where
    R: Rng + Clone,
    V: Vocab,
    V::Config: Serialize
[src]

type InputVocab = V

type Metadata = SkipgramMetadata<V::Config>

impl<R: Clone, V: Clone> Clone for SkipgramTrainer<R, V>[src]

Auto Trait Implementations

impl<R, V> Send for SkipgramTrainer<R, V> where
    R: Send,
    V: Send + Sync

impl<R, V> Sync for SkipgramTrainer<R, V> where
    R: Sync,
    V: Send + Sync

impl<R, V> Unpin for SkipgramTrainer<R, V> where
    R: Unpin

impl<R, V> UnwindSafe for SkipgramTrainer<R, V> where
    R: UnwindSafe,
    V: RefUnwindSafe

impl<R, V> RefUnwindSafe for SkipgramTrainer<R, V> where
    R: RefUnwindSafe,
    V: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,