pub struct NtmOptimizerConfig {
pub num_slots: usize,
pub num_locations: usize,
pub mem_width: usize,
pub hidden_dim: usize,
pub shift_range: usize,
pub mem_init_scale: f64,
pub base_lr: f64,
pub momentum_decay: f64,
pub rms_decay: f64,
pub max_grad_norm: f64,
pub seed: u64,
}Expand description
Configuration for NtmOptimizer.
Numeric hyper-parameters are stored as f64 and converted to the optimizer’s
scalar type T when the optimizer is constructed.
Fields§
§num_slots: usizeRequested number of parameter chunks (clamped to the parameter count).
num_locations: usizeNumber of memory locations (rows of the memory matrix M).
mem_width: usizeWidth of each memory location (columns of M); also the read/key width.
Controller hidden-layer dimension.
shift_range: usizeMaximum convolutional shift magnitude; allowed shifts are
-shift_range ..= shift_range, giving 2·shift_range + 1 entries.
mem_init_scale: f64Half-width of the uniform interval used to initialise the memory matrix.
base_lr: f64Base learning rate applied before the learned per-chunk step scale.
momentum_decay: f64EMA decay for the gradient (momentum), often called beta1.
rms_decay: f64EMA decay for the squared gradient (RMS), often called beta2.
max_grad_norm: f64Maximum gradient L2 norm; larger gradients are rescaled before use.
seed: u64Seed for deterministic weight and memory initialisation.
Trait Implementations§
Source§impl Clone for NtmOptimizerConfig
impl Clone for NtmOptimizerConfig
Source§impl Debug for NtmOptimizerConfig
impl Debug for NtmOptimizerConfig
Auto Trait Implementations§
impl Freeze for NtmOptimizerConfig
impl RefUnwindSafe for NtmOptimizerConfig
impl Send for NtmOptimizerConfig
impl Sync for NtmOptimizerConfig
impl Unpin for NtmOptimizerConfig
impl UnsafeUnpin for NtmOptimizerConfig
impl UnwindSafe for NtmOptimizerConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.