#[derive(Debug, thiserror::Error)]
pub enum EegDinoError {
#[error("missing weight key: {key}")]
MissingWeight { key: String },
#[error("shape mismatch for {key}: expected {expected}D, got {actual:?}")]
ShapeMismatch {
key: String,
expected: usize,
actual: Vec<usize>,
},
#[error("invalid input: {0}")]
InvalidInput(String),
#[error("cannot detect model size: {0}")]
UnknownModelSize(String),
#[error("failed to load weights: {0}")]
WeightLoad(String),
#[error("builder error: {0}")]
Builder(String),
#[error(transparent)]
Io(#[from] std::io::Error),
}
pub type Result<T> = std::result::Result<T, EegDinoError>;