pub struct CodecSlot;Expand description
Generic Codec slot placeholder. Embed as codec: CodecSlot in your
Module struct; bind a concrete CodecRuntime via
Compiler::new().bind_codec::<T>("slot")….
Implementations§
Source§impl CodecSlot
impl CodecSlot
Sourcepub fn train(&self, g: &mut Graph, samples: Output) -> Output
pub fn train(&self, g: &mut Graph, samples: Output) -> Output
Train(samples) → trigger — optional calibration pass.
Quantizers learn scale/zero-point, PQ codebooks run k-means,
dtype casts skip the call. The output rides TYPE_TRIGGER so
Module::bootstrap (or a downstream bb.barrier) can gate
body ops on training completion. Stamps
ai.bytesandbrains.codec.port = "in" since samples flow at
the In storage position.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodecSlot
impl RefUnwindSafe for CodecSlot
impl Send for CodecSlot
impl Sync for CodecSlot
impl Unpin for CodecSlot
impl UnsafeUnpin for CodecSlot
impl UnwindSafe for CodecSlot
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