pub struct BiasLayerBuilder<const N: usize> {}
Expand description
Trait for BiasLayer instance creation
Implementations§
Source§impl<const N: usize> BiasLayerBuilder<N>
impl<const N: usize> BiasLayerBuilder<N>
pub fn new() -> BiasLayerBuilder<N>
Sourcepub fn build<U, C, P, D, I, PI, UI, OP, B>(
&self,
parent: P,
device: &D,
ui: UI,
b: &B,
) -> Result<BiasLayer<U, C, P, OP, D, I, PI, N>, LayerInstantiationError>where
P: ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = PI> + PreTrain<U> + Loss<U>,
U: Default + Clone + Copy + Send + UnitValue<U>,
D: Device<U>,
I: Debug + Send + Sync + BatchDataType,
PI: Debug + BatchDataType,
<I as BatchDataType>::Type: Debug + Send + Sync + 'static,
OP: Optimizer<U, D>,
B: OptimizerBuilder<U, D, Output = OP>,
UI: FnMut() -> U,
BiasLayer<U, C, P, OP, D, I, PI, N>: BiasLayerInstantiation<U, C, P, OP, D, I, PI, N>,
pub fn build<U, C, P, D, I, PI, UI, OP, B>(
&self,
parent: P,
device: &D,
ui: UI,
b: &B,
) -> Result<BiasLayer<U, C, P, OP, D, I, PI, N>, LayerInstantiationError>where
P: ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = PI> + PreTrain<U> + Loss<U>,
U: Default + Clone + Copy + Send + UnitValue<U>,
D: Device<U>,
I: Debug + Send + Sync + BatchDataType,
PI: Debug + BatchDataType,
<I as BatchDataType>::Type: Debug + Send + Sync + 'static,
OP: Optimizer<U, D>,
B: OptimizerBuilder<U, D, Output = OP>,
UI: FnMut() -> U,
BiasLayer<U, C, P, OP, D, I, PI, N>: BiasLayerInstantiation<U, C, P, OP, D, I, PI, N>,
Auto Trait Implementations§
impl<const N: usize> Freeze for BiasLayerBuilder<N>
impl<const N: usize> RefUnwindSafe for BiasLayerBuilder<N>
impl<const N: usize> Send for BiasLayerBuilder<N>
impl<const N: usize> Sync for BiasLayerBuilder<N>
impl<const N: usize> Unpin for BiasLayerBuilder<N>
impl<const N: usize> UnwindSafe for BiasLayerBuilder<N>
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