pub struct LayerSpec {
pub op: String,
pub width: usize,
pub activation: String,
}Expand description
Specification for a single layer in a neural architecture.
Fields§
§op: StringOperation type (e.g. “linear”, “conv”, “attention”).
width: usizeWidth (number of output units / channels).
activation: StringNon-linearity applied after the operation (e.g. “relu”, “gelu”).
Trait Implementations§
impl StructuralPartialEq for LayerSpec
Auto Trait Implementations§
impl Freeze for LayerSpec
impl RefUnwindSafe for LayerSpec
impl Send for LayerSpec
impl Sync for LayerSpec
impl Unpin for LayerSpec
impl UnsafeUnpin for LayerSpec
impl UnwindSafe for LayerSpec
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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