pub struct AdafactorBuilder { /* private fields */ }Expand description
Builder for Adafactor.
Implementations§
Source§impl AdafactorBuilder
impl AdafactorBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new AdafactorBuilder.
Source§impl AdafactorBuilder
impl AdafactorBuilder
Sourcepub fn eps(self, eps: impl Into<AdafactorEps>) -> Self
pub fn eps(self, eps: impl Into<AdafactorEps>) -> Self
Sets the value of [eps].
Sourcepub fn clip_threshold(self, clip_threshold: impl Into<f32>) -> Self
pub fn clip_threshold(self, clip_threshold: impl Into<f32>) -> Self
Sets the value of [clip_threshold].
Sourcepub fn decay_rate(self, decay_rate: impl Into<f32>) -> Self
pub fn decay_rate(self, decay_rate: impl Into<f32>) -> Self
Sets the value of [decay_rate].
Sourcepub fn beta1(self, beta1: impl Into<AdafactorBuilderBeta1>) -> Self
pub fn beta1(self, beta1: impl Into<AdafactorBuilderBeta1>) -> Self
Sets the value of [beta1].
Sourcepub fn weight_decay(self, weight_decay: impl Into<f32>) -> Self
pub fn weight_decay(self, weight_decay: impl Into<f32>) -> Self
Sets the value of [weight_decay].
Sourcepub fn scale_parameter(self, scale_parameter: impl Into<bool>) -> Self
pub fn scale_parameter(self, scale_parameter: impl Into<bool>) -> Self
Sets the value of [scale_parameter].
Sourcepub fn relative_step(self, relative_step: impl Into<bool>) -> Self
pub fn relative_step(self, relative_step: impl Into<bool>) -> Self
Sets the value of [relative_step].
Sourcepub fn warmup_init(self, warmup_init: impl Into<bool>) -> Self
pub fn warmup_init(self, warmup_init: impl Into<bool>) -> Self
Sets the value of [warmup_init].
Trait Implementations§
Source§impl Builder<Adafactor> for AdafactorBuilder
impl Builder<Adafactor> for AdafactorBuilder
Source§impl Clone for AdafactorBuilder
impl Clone for AdafactorBuilder
Source§fn clone(&self) -> AdafactorBuilder
fn clone(&self) -> AdafactorBuilder
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 AdafactorBuilder
impl RefUnwindSafe for AdafactorBuilder
impl Send for AdafactorBuilder
impl Sync for AdafactorBuilder
impl Unpin for AdafactorBuilder
impl UnwindSafe for AdafactorBuilder
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 moreSource§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Convert into an
Option.