pub struct CompilationTrainer { /* private fields */ }Expand description
Helper for training compilation parameters
Implementations§
Source§impl CompilationTrainer
impl CompilationTrainer
Sourcepub fn train_step(
&mut self,
graph: &ComputationGraph,
target_performance: f32,
) -> JitResult<f32>
pub fn train_step( &mut self, graph: &ComputationGraph, target_performance: f32, ) -> JitResult<f32>
Train on a single graph
Sourcepub fn train(
&mut self,
graphs: &[ComputationGraph],
targets: &[f32],
epochs: usize,
) -> JitResult<Vec<TrainingEpoch>>
pub fn train( &mut self, graphs: &[ComputationGraph], targets: &[f32], epochs: usize, ) -> JitResult<Vec<TrainingEpoch>>
Train for multiple epochs
Sourcepub fn best_params(&self) -> &CompilationParams
pub fn best_params(&self) -> &CompilationParams
Get best parameters from training
Auto Trait Implementations§
impl Freeze for CompilationTrainer
impl RefUnwindSafe for CompilationTrainer
impl Send for CompilationTrainer
impl Sync for CompilationTrainer
impl Unpin for CompilationTrainer
impl UnsafeUnpin for CompilationTrainer
impl UnwindSafe for CompilationTrainer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more