[][src]Struct finalfrontier::SubwordVocabConfig

pub struct SubwordVocabConfig<V> {
    pub min_count: u32,
    pub discard_threshold: f32,
    pub min_n: u32,
    pub max_n: u32,
    pub indexer: V,
}

Hyperparameters for Subword vocabs.

Fields

min_count: u32

Minimum token count.

No word-specific embeddings will be trained for tokens occurring less than this count.

discard_threshold: f32

Discard threshold.

The discard threshold is used to compute the discard probability of a token. E.g. with a threshold of 0.00001 tokens with approximately that probability will never be discarded.

min_n: u32

Minimum n-gram length for subword units (inclusive).

max_n: u32

Maximum n-gram length for subword units (inclusive).

indexer: V

Indexer specific parameters.

Trait Implementations

impl<V: Clone> Clone for SubwordVocabConfig<V>[src]

impl<V: Copy> Copy for SubwordVocabConfig<V>[src]

impl<V: Debug> Debug for SubwordVocabConfig<V>[src]

impl<V> Serialize for SubwordVocabConfig<V> where
    V: Serialize
[src]

Auto Trait Implementations

impl<V> Send for SubwordVocabConfig<V> where
    V: Send

impl<V> Sync for SubwordVocabConfig<V> where
    V: Sync

impl<V> Unpin for SubwordVocabConfig<V> where
    V: Unpin

impl<V> UnwindSafe for SubwordVocabConfig<V> where
    V: UnwindSafe

impl<V> RefUnwindSafe for SubwordVocabConfig<V> where
    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>,