pub struct NNOptimizerRmsProp { /* private fields */ }Expand description
Wraps MPSNNOptimizerRMSProp.
Implementations§
Source§impl NNOptimizerRmsProp
impl NNOptimizerRmsProp
Sourcepub fn learning_rate(&self) -> f32
pub fn learning_rate(&self) -> f32
Wraps the corresponding Metal Performance Shaders method.
Sourcepub fn set_learning_rate(&self, value: f32)
pub fn set_learning_rate(&self, value: f32)
Wraps the corresponding Metal Performance Shaders method.
Sourcepub fn gradient_rescale(&self) -> f32
pub fn gradient_rescale(&self) -> f32
Wraps the corresponding Metal Performance Shaders method.
Sourcepub fn apply_gradient_clipping(&self) -> bool
pub fn apply_gradient_clipping(&self) -> bool
Wraps the corresponding Metal Performance Shaders method.
Sourcepub fn set_apply_gradient_clipping(&self, value: bool)
pub fn set_apply_gradient_clipping(&self, value: bool)
Wraps the corresponding Metal Performance Shaders method.
Sourcepub fn gradient_clip_max(&self) -> f32
pub fn gradient_clip_max(&self) -> f32
Wraps the corresponding Metal Performance Shaders method.
Sourcepub fn gradient_clip_min(&self) -> f32
pub fn gradient_clip_min(&self) -> f32
Wraps the corresponding Metal Performance Shaders method.
Sourcepub fn regularization_scale(&self) -> f32
pub fn regularization_scale(&self) -> f32
Wraps the corresponding Metal Performance Shaders method.
Sourcepub fn regularization_type(&self) -> usize
pub fn regularization_type(&self) -> usize
Wraps the corresponding Metal Performance Shaders method.
Source§impl NNOptimizerRmsProp
impl NNOptimizerRmsProp
Sourcepub fn new(device: &MetalDevice, learning_rate: f32) -> Option<Self>
pub fn new(device: &MetalDevice, learning_rate: f32) -> Option<Self>
Wraps a constructor on MPSNNOptimizerRMSProp.
Sourcepub fn new_with_options(
device: &MetalDevice,
decay: f64,
epsilon: f32,
optimizer_descriptor: &NNOptimizerDescriptor,
) -> Option<Self>
pub fn new_with_options( device: &MetalDevice, decay: f64, epsilon: f32, optimizer_descriptor: &NNOptimizerDescriptor, ) -> Option<Self>
Wraps a constructor on MPSNNOptimizerRMSProp.
Sourcepub fn as_optimizer(&self) -> Option<NNOptimizer>
pub fn as_optimizer(&self) -> Option<NNOptimizer>
Wraps the corresponding MPSNNOptimizerRMSProp conversion helper.
Sourcepub fn encode_vector(
&self,
command_buffer: &CommandBuffer,
input_gradient_vector: &Vector,
input_values_vector: &Vector,
input_sum_of_squares_vector: &Vector,
result_values_vector: &Vector,
)
pub fn encode_vector( &self, command_buffer: &CommandBuffer, input_gradient_vector: &Vector, input_values_vector: &Vector, input_sum_of_squares_vector: &Vector, result_values_vector: &Vector, )
Wraps the corresponding MPSNNOptimizerRMSProp encode entry point.
Sourcepub fn encode_matrix(
&self,
command_buffer: &CommandBuffer,
input_gradient_matrix: &Matrix,
input_values_matrix: &Matrix,
input_sum_of_squares_matrix: &Matrix,
result_values_matrix: &Matrix,
)
pub fn encode_matrix( &self, command_buffer: &CommandBuffer, input_gradient_matrix: &Matrix, input_values_matrix: &Matrix, input_sum_of_squares_matrix: &Matrix, result_values_matrix: &Matrix, )
Wraps the corresponding MPSNNOptimizerRMSProp encode entry point.