pub struct ParamGroupBuilder { /* private fields */ }Expand description
Builder for creating parameter groups with various options
Implementations§
Source§impl ParamGroupBuilder
impl ParamGroupBuilder
Sourcepub fn weight_decay(self, weight_decay: f32) -> Self
pub fn weight_decay(self, weight_decay: f32) -> Self
Set weight decay
Sourcepub fn from_options(self, options: &OptimizerOptions) -> Self
pub fn from_options(self, options: &OptimizerOptions) -> Self
Set options from OptimizerOptions
Sourcepub fn build(self) -> ParamGroup
pub fn build(self) -> ParamGroup
Build the parameter group
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamGroupBuilder
impl !RefUnwindSafe for ParamGroupBuilder
impl Send for ParamGroupBuilder
impl Sync for ParamGroupBuilder
impl Unpin for ParamGroupBuilder
impl UnsafeUnpin for ParamGroupBuilder
impl !UnwindSafe for ParamGroupBuilder
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