use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("failed to parse .nam JSON: {0}")]
Json(#[from] serde_json::Error),
#[error("failed to read .nam file: {0}")]
Io(#[from] std::io::Error),
#[error("unsupported model architecture: {0:?}")]
UnsupportedArchitecture(String),
#[error("unsupported activation function: {0:?}")]
UnsupportedActivation(String),
#[error("weight count mismatch: config implies {expected} weights, file has {found}")]
WeightCountMismatch { expected: usize, found: usize },
}