pub struct LinearAttackModel {
pub weights: Vec<Vec<f64>>,
pub bias: Vec<f64>,
}Expand description
A simple linear model f(x) = W·x + b used primarily for testing attacks.
Fields§
§weights: Vec<Vec<f64>>Weight matrix: weights[i] is the i-th output row (length = n_inputs).
bias: Vec<f64>Bias vector (length = n_outputs).
Implementations§
Trait Implementations§
Source§impl AttackModel for LinearAttackModel
impl AttackModel for LinearAttackModel
Auto Trait Implementations§
impl Freeze for LinearAttackModel
impl RefUnwindSafe for LinearAttackModel
impl Send for LinearAttackModel
impl Sync for LinearAttackModel
impl Unpin for LinearAttackModel
impl UnsafeUnpin for LinearAttackModel
impl UnwindSafe for LinearAttackModel
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