Skip to main content

DataAugmenter

Trait DataAugmenter 

Source
pub trait DataAugmenter {
    // Required method
    fn augment(
        &self,
        data: &ArrayView2<'_, f64>,
        rng: &mut StdRng,
    ) -> TrainResult<Array2<f64>>;
}
Expand description

Trait for data augmentation strategies.

Required Methods§

Source

fn augment( &self, data: &ArrayView2<'_, f64>, rng: &mut StdRng, ) -> TrainResult<Array2<f64>>

Augment the given data.

§Arguments
  • data - Input data to augment
  • rng - Random number generator for stochastic augmentation
§Returns

Augmented data with the same shape as input

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl DataAugmenter for Box<dyn AugmenterClone>

Source§

fn augment( &self, data: &ArrayView2<'_, f64>, rng: &mut StdRng, ) -> TrainResult<Array2<f64>>

Implementors§