pub struct ManifoldRGD<M: Manifold<B>, B: Backend> { /* private fields */ }Trait Implementations§
Source§impl<M: Clone + Manifold<B>, B: Clone + Backend> Clone for ManifoldRGD<M, B>
impl<M: Clone + Manifold<B>, B: Clone + Backend> Clone for ManifoldRGD<M, B>
Source§fn clone(&self) -> ManifoldRGD<M, B>
fn clone(&self) -> ManifoldRGD<M, B>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<M, B> Default for ManifoldRGD<M, B>
impl<M, B> Default for ManifoldRGD<M, B>
Source§impl<M, B> SimpleOptimizer<B> for ManifoldRGD<M, B>
impl<M, B> SimpleOptimizer<B> for ManifoldRGD<M, B>
Source§type State<const D: usize> = ManifoldRGDState<B, D>
type State<const D: usize> = ManifoldRGDState<B, D>
The state of the optimizer. It also implements record, so that it can be saved.
Auto Trait Implementations§
impl<M, B> Freeze for ManifoldRGD<M, B>
impl<M, B> RefUnwindSafe for ManifoldRGD<M, B>where
M: RefUnwindSafe,
B: RefUnwindSafe,
impl<M, B> Send for ManifoldRGD<M, B>
impl<M, B> Sync for ManifoldRGD<M, B>
impl<M, B> Unpin for ManifoldRGD<M, B>
impl<M, B> UnsafeUnpin for ManifoldRGD<M, B>
impl<M, B> UnwindSafe for ManifoldRGD<M, B>where
M: UnwindSafe,
B: UnwindSafe,
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<B, T> LessSimpleHessianOptimizer<B> for Twhere
B: Backend,
T: SimpleHessianOptimizer<B>,
impl<B, T> LessSimpleHessianOptimizer<B> for Twhere
B: Backend,
T: SimpleHessianOptimizer<B>,
fn many_steps<const D: usize, const H: usize>( &self, lr_function: impl FnMut(usize) -> f64, num_steps: usize, grad_function: impl FnMut(Tensor<B, D>) -> Tensor<B, D>, hessian_function: impl FnMut(Tensor<B, D>) -> Option<Tensor<B, H>>, tensor: Tensor<B, D>, state: Option<<T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>>, ) -> (Tensor<B, D>, Option<<T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>>)
Source§impl<B, T> LessSimpleOptimizer<B> for Twhere
B: Backend,
T: SimpleOptimizer<B>,
impl<B, T> LessSimpleOptimizer<B> for Twhere
B: Backend,
T: SimpleOptimizer<B>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<B, T> SimpleHessianOptimizer<B> for Twhere
B: Backend,
T: SimpleOptimizer<B>,
impl<B, T> SimpleHessianOptimizer<B> for Twhere
B: Backend,
T: SimpleOptimizer<B>,
Source§type StateWithHessian<const D: usize, const H: usize> = <T as SimpleOptimizer<B>>::State<D>
type StateWithHessian<const D: usize, const H: usize> = <T as SimpleOptimizer<B>>::State<D>
The state of the optimizer. It also implements record, so that it can be saved.
Source§fn step_with_hessian<const D: usize, const H: usize>(
&self,
lr: f64,
tensor: Tensor<B, D>,
grad: Tensor<B, D>,
_hessian: Tensor<B, H>,
state: Option<<T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>>,
) -> (Tensor<B, D>, Option<<T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>>)
fn step_with_hessian<const D: usize, const H: usize>( &self, lr: f64, tensor: Tensor<B, D>, grad: Tensor<B, D>, _hessian: Tensor<B, H>, state: Option<<T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>>, ) -> (Tensor<B, D>, Option<<T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>>)
The optimizer step is performed for one tensor at a time with its gradient, hessian and state. Read more
Source§fn to_device<const D: usize, const H: usize>(
state: <T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>,
device: &<B as Backend>::Device,
) -> <T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>
fn to_device<const D: usize, const H: usize>( state: <T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>, device: &<B as Backend>::Device, ) -> <T as SimpleHessianOptimizer<B>>::StateWithHessian<D, H>
Change the device of the state. Read more
Source§fn step<const D: usize, const H: usize>(
&self,
lr: LearningRate,
tensor: Tensor<B, D>,
grad: Tensor<B, D>,
hessian: Option<Tensor<B, H>>,
state: Option<Self::StateWithHessian<D, H>>,
) -> (Tensor<B, D>, Option<Self::StateWithHessian<D, H>>)
fn step<const D: usize, const H: usize>( &self, lr: LearningRate, tensor: Tensor<B, D>, grad: Tensor<B, D>, hessian: Option<Tensor<B, H>>, state: Option<Self::StateWithHessian<D, H>>, ) -> (Tensor<B, D>, Option<Self::StateWithHessian<D, H>>)
The optimizer step is performed for one tensor at a time with its gradient, hessian and state. Read more