pub struct Crop {
pub name: String,
pub size: usize,
/* private fields */
}Expand description
Augmenter that crops each series into a random continuous slice of specified size
Also known as window slicing
Fields§
§name: String§size: usizeImplementations§
Trait Implementations§
Source§impl Augmenter for Crop
impl Augmenter for Crop
Source§fn set_probability(&mut self, _probability: f64)
fn set_probability(&mut self, _probability: f64)
Not implemented!
The Crop augmenter always augments all rows so that all
series in a batch have the same length
Source§fn get_probability(&self) -> f64
fn get_probability(&self) -> f64
Get the probability that this augmenter will augment a series in a batch
fn get_name(&self) -> String
Source§fn augment_batch(&self, input: &mut Dataset, parallel: bool, per_sample: bool)where
Self: Sync,
fn augment_batch(&self, input: &mut Dataset, parallel: bool, per_sample: bool)where
Self: Sync,
Augment a whole batch Read more
Source§fn supports_per_sample(&self) -> bool
fn supports_per_sample(&self) -> bool
Indicate whether this augmenter supports per-sample chaining.
By default, return true. Augmenters that need a batch level view
should override this to return false.
Auto Trait Implementations§
impl Freeze for Crop
impl RefUnwindSafe for Crop
impl Send for Crop
impl Sync for Crop
impl Unpin for Crop
impl UnwindSafe for Crop
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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