[−][src]Struct finalfrontier::DepembedsTrainer
Dependency embeddings Trainer.
The DepembedsTrainer
holds the information and logic necessary to transform a
conllx::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> DepembedsTrainer<R>
[src]
pub fn dep_config(&self) -> DepembedsConfig
[src]
impl<R> DepembedsTrainer<ReseedOnCloneRng<R>> where
R: Rng + Clone + SeedableRng,
[src]
R: Rng + Clone + SeedableRng,
pub fn new(
input_vocab: SubwordVocab,
output_vocab: SimpleVocab<Dependency>,
common_config: CommonConfig,
dep_config: DepembedsConfig,
rng: R
) -> Self
[src]
input_vocab: SubwordVocab,
output_vocab: SimpleVocab<Dependency>,
common_config: CommonConfig,
dep_config: DepembedsConfig,
rng: R
) -> Self
Constructs a new DepTrainer
.
Trait Implementations
impl<R> Trainer for DepembedsTrainer<R> where
R: Rng,
[src]
R: Rng,
type InputVocab = SubwordVocab
type Metadata = DepembedsMetadata<SubwordVocabConfig, SimpleVocabConfig>
fn input_indices(&self, idx: usize) -> Vec<u64>
[src]
fn input_vocab(&self) -> &SubwordVocab
[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: Clone> Clone for DepembedsTrainer<R>
[src]
fn clone(&self) -> DepembedsTrainer<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 DepembedsTrainer<R> where
R: Send,
R: Send,
impl<R> Sync for DepembedsTrainer<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>,