pub enum TrainerError {
Step(StepError),
EmptyBatch,
Observer {
step_index: usize,
steps_processed: usize,
cause: String,
},
InvalidSample {
index: usize,
reason: SampleInvariant,
},
}Expand description
Errors from batch training sessions.
Variants§
Step(StepError)
Underlying network step failed.
EmptyBatch
run_session was called with an empty batch.
Empty is a batch-level condition (no sample index). The network, trainer config, and any caller-owned metrics are left untouched.
Observer
A per-step observer returned an error after a successful network step.
The network update for step_index has already been applied. No further
example is processed (abort-before-next-step). steps_processed counts
completed network steps, including the one whose observer then failed.
Fields
InvalidSample
Preflight rejected the batch because sample index violated reason.
No earlier sample has been applied; trainer and network state are unchanged.
Fields
§
reason: SampleInvariantWhich admission invariant failed.
Trait Implementations§
Source§impl Clone for TrainerError
impl Clone for TrainerError
Source§fn clone(&self) -> TrainerError
fn clone(&self) -> TrainerError
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 Debug for TrainerError
impl Debug for TrainerError
Source§impl Display for TrainerError
impl Display for TrainerError
impl Eq for TrainerError
Source§impl Error for TrainerError
impl Error for TrainerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for TrainerError
impl PartialEq for TrainerError
impl StructuralPartialEq for TrainerError
Auto Trait Implementations§
impl Freeze for TrainerError
impl RefUnwindSafe for TrainerError
impl Send for TrainerError
impl Sync for TrainerError
impl Unpin for TrainerError
impl UnsafeUnpin for TrainerError
impl UnwindSafe for TrainerError
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