pub struct CurriculumScheduler { /* private fields */ }Expand description
Curriculum scheduler for progressive training
Implementations§
Source§impl CurriculumScheduler
impl CurriculumScheduler
pub fn into_reference( val: CurriculumScheduler, env: Env, ) -> Result<Reference<CurriculumScheduler>>
pub fn into_instance( self, env: Env, ) -> Result<ClassInstance<CurriculumScheduler>>
Source§impl CurriculumScheduler
impl CurriculumScheduler
Sourcepub fn default_curriculum(total_steps: u32) -> Self
pub fn default_curriculum(total_steps: u32) -> Self
Create a default easy-to-hard curriculum
Sourcepub fn add_stage(&mut self, config: CurriculumStageConfig)
pub fn add_stage(&mut self, config: CurriculumStageConfig)
Add a stage to the curriculum
Sourcepub fn step(&mut self) -> Option<CurriculumStageConfig>
pub fn step(&mut self) -> Option<CurriculumStageConfig>
Step the curriculum and return current stage info
Sourcepub fn difficulty(&self) -> f64
pub fn difficulty(&self) -> f64
Get current difficulty (0.0 to 1.0)
Sourcepub fn temperature(&self) -> f64
pub fn temperature(&self) -> f64
Get current temperature
Sourcepub fn negative_count(&self) -> u32
pub fn negative_count(&self) -> u32
Get current negative count
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if curriculum is complete
Trait Implementations§
Source§impl FromNapiMutRef for CurriculumScheduler
impl FromNapiMutRef for CurriculumScheduler
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for CurriculumScheduler
impl FromNapiRef for CurriculumScheduler
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &CurriculumScheduler
impl FromNapiValue for &CurriculumScheduler
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut CurriculumScheduler
impl FromNapiValue for &mut CurriculumScheduler
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ObjectFinalize for CurriculumScheduler
impl ObjectFinalize for CurriculumScheduler
Source§impl ToNapiValue for CurriculumScheduler
impl ToNapiValue for CurriculumScheduler
Source§unsafe fn to_napi_value(
env: napi_env,
val: CurriculumScheduler,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: CurriculumScheduler, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &CurriculumScheduler
impl TypeName for &CurriculumScheduler
Source§impl TypeName for &mut CurriculumScheduler
impl TypeName for &mut CurriculumScheduler
Source§impl TypeName for CurriculumScheduler
impl TypeName for CurriculumScheduler
Source§impl ValidateNapiValue for &CurriculumScheduler
impl ValidateNapiValue for &CurriculumScheduler
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut CurriculumScheduler
impl ValidateNapiValue for &mut CurriculumScheduler
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for CurriculumScheduler
impl RefUnwindSafe for CurriculumScheduler
impl Send for CurriculumScheduler
impl Sync for CurriculumScheduler
impl Unpin for CurriculumScheduler
impl UnsafeUnpin for CurriculumScheduler
impl UnwindSafe for CurriculumScheduler
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