pub struct AedWeightBundle {
pub model_hash: u64,
pub weight: [f32; 16],
pub bias: [f32; 4],
pub class_hashes: [u64; 4],
}Expand description
Compact linear head over [energy, zcr, spectral_flux_proxy].
Fields§
§model_hash: u64§weight: [f32; 16]4 classes × 4 features
bias: [f32; 4]§class_hashes: [u64; 4]Implementations§
Source§impl AedWeightBundle
impl AedWeightBundle
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Serialize to disk (cold path). Layout: magic, ver, model_hash, weight[16], bias[4], class[4].
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, AudioError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, AudioError>
Parses bytes.
Trait Implementations§
Source§impl Clone for AedWeightBundle
impl Clone for AedWeightBundle
Auto Trait Implementations§
impl Freeze for AedWeightBundle
impl RefUnwindSafe for AedWeightBundle
impl Send for AedWeightBundle
impl Sync for AedWeightBundle
impl Unpin for AedWeightBundle
impl UnsafeUnpin for AedWeightBundle
impl UnwindSafe for AedWeightBundle
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