pub struct TensorFlowOptimizerFactory;Expand description
TensorFlow optimizer factory
Implementations§
Source§impl TensorFlowOptimizerFactory
impl TensorFlowOptimizerFactory
Sourcepub fn adam(
learning_rate: f64,
beta_1: f64,
beta_2: f64,
epsilon: f64,
weight_decay: Option<f64>,
clipnorm: Option<f64>,
clipvalue: Option<f64>,
global_clipnorm: Option<f64>,
use_ema: bool,
ema_momentum: f64,
jit_compile: bool,
name: Option<String>,
) -> Result<TensorFlowAdam>
pub fn adam( learning_rate: f64, beta_1: f64, beta_2: f64, epsilon: f64, weight_decay: Option<f64>, clipnorm: Option<f64>, clipvalue: Option<f64>, global_clipnorm: Option<f64>, use_ema: bool, ema_momentum: f64, jit_compile: bool, name: Option<String>, ) -> Result<TensorFlowAdam>
Create Adam optimizer
Sourcepub fn adamw(
learning_rate: f64,
beta_1: f64,
beta_2: f64,
epsilon: f64,
weight_decay: f64,
clipnorm: Option<f64>,
clipvalue: Option<f64>,
global_clipnorm: Option<f64>,
use_ema: bool,
ema_momentum: f64,
jit_compile: bool,
name: Option<String>,
) -> Result<TensorFlowAdamW>
pub fn adamw( learning_rate: f64, beta_1: f64, beta_2: f64, epsilon: f64, weight_decay: f64, clipnorm: Option<f64>, clipvalue: Option<f64>, global_clipnorm: Option<f64>, use_ema: bool, ema_momentum: f64, jit_compile: bool, name: Option<String>, ) -> Result<TensorFlowAdamW>
Create AdamW optimizer
Sourcepub fn exponential_decay(
initial_learning_rate: f64,
decay_steps: i64,
decay_rate: f64,
staircase: bool,
) -> TensorFlowExponentialDecay
pub fn exponential_decay( initial_learning_rate: f64, decay_steps: i64, decay_rate: f64, staircase: bool, ) -> TensorFlowExponentialDecay
Create exponential decay schedule
Sourcepub fn cosine_decay(
initial_learning_rate: f64,
decay_steps: i64,
alpha: f64,
) -> TensorFlowCosineDecay
pub fn cosine_decay( initial_learning_rate: f64, decay_steps: i64, alpha: f64, ) -> TensorFlowCosineDecay
Create cosine decay schedule
Auto Trait Implementations§
impl Freeze for TensorFlowOptimizerFactory
impl RefUnwindSafe for TensorFlowOptimizerFactory
impl Send for TensorFlowOptimizerFactory
impl Sync for TensorFlowOptimizerFactory
impl Unpin for TensorFlowOptimizerFactory
impl UnwindSafe for TensorFlowOptimizerFactory
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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