pub enum InputPreprocessing {
GaussianNoise {
std_dev: f64,
},
PixelDropping {
drop_probability: f64,
},
JPEGCompression {
quality: f64,
},
BitDepthReduction {
bits: usize,
},
SpatialSmoothing {
kernel_size: usize,
},
TotalVariationMinimization {
lambda: f64,
},
}Expand description
Input preprocessing methods for defense
Variants§
GaussianNoise
Gaussian noise injection
PixelDropping
Pixel dropping
JPEGCompression
JPEG compression
BitDepthReduction
Bit depth reduction
SpatialSmoothing
Spatial smoothing
TotalVariationMinimization
Total variation minimization
Trait Implementations§
Source§impl Clone for InputPreprocessing
impl Clone for InputPreprocessing
Source§fn clone(&self) -> InputPreprocessing
fn clone(&self) -> InputPreprocessing
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputPreprocessing
impl Debug for InputPreprocessing
Source§impl PartialEq for InputPreprocessing
impl PartialEq for InputPreprocessing
impl StructuralPartialEq for InputPreprocessing
Auto Trait Implementations§
impl Freeze for InputPreprocessing
impl RefUnwindSafe for InputPreprocessing
impl Send for InputPreprocessing
impl Sync for InputPreprocessing
impl Unpin for InputPreprocessing
impl UnwindSafe for InputPreprocessing
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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