pub enum MaeError {
WindowShapeMismatch {
time: usize,
subc: usize,
expected: usize,
actual: usize,
},
PatchExceedsWindow {
axis: &'static str,
patch: usize,
window: usize,
},
NotDivisible {
axis: &'static str,
window: usize,
patch: usize,
remainder: usize,
crop: usize,
},
InvalidMaskRatio {
ratio: f64,
},
NonFiniteValue {
row: usize,
col: usize,
value: f32,
},
}Expand description
Errors produced by the MAE pretraining patchify / masking functions
(crate::mae, ADR-152 §2.3).
Variants§
WindowShapeMismatch
The flat window buffer does not match the declared time × subc shape.
Fields
PatchExceedsWindow
A patch dimension is larger than the window along that axis.
Fields
NotDivisible
The window is not an exact multiple of the patch extent along an axis.
Patchification never silently truncates; crop the window to crop
(the largest divisible extent) or change the patch size.
Fields
InvalidMaskRatio
The mask ratio is not a finite value strictly inside (0, 1) — the
same rule as MaePretrainConfig::validate. A NaN ratio must never
silently mask zero patches, and ratios ≤ 0 / ≥ 1 degenerate to
all-visible / all-masked grids.
NonFiniteValue
A NaN or ±inf CSI value was found; corrupted input must be cleaned upstream, never masked over.
Trait Implementations§
Source§impl Error for MaeError
impl Error for MaeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for MaeError
impl RefUnwindSafe for MaeError
impl Send for MaeError
impl Sync for MaeError
impl Unpin for MaeError
impl UnsafeUnpin for MaeError
impl UnwindSafe for MaeError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more