pub struct LayerParameters {
pub units: Option<usize>,
pub kernel_size: Option<(usize, usize)>,
pub stride: Option<(usize, usize)>,
pub padding: Option<(usize, usize)>,
pub dropout_rate: Option<f64>,
pub num_heads: Option<usize>,
pub hidden_dim: Option<usize>,
pub custom: HashMap<String, f64>,
}
Expand description
Layer-specific parameters
Fields§
§units: Option<usize>
Number of units/filters
kernel_size: Option<(usize, usize)>
Kernel size (for convolutions)
stride: Option<(usize, usize)>
Stride (for convolutions/pooling)
padding: Option<(usize, usize)>
Padding (for convolutions)
dropout_rate: Option<f64>
Dropout rate
num_heads: Option<usize>
Number of attention heads
Hidden dimension
custom: HashMap<String, f64>
Custom parameters
Trait Implementations§
Source§impl Clone for LayerParameters
impl Clone for LayerParameters
Source§fn clone(&self) -> LayerParameters
fn clone(&self) -> LayerParameters
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 moreAuto Trait Implementations§
impl Freeze for LayerParameters
impl RefUnwindSafe for LayerParameters
impl Send for LayerParameters
impl Sync for LayerParameters
impl Unpin for LayerParameters
impl UnwindSafe for LayerParameters
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