pub struct ConvNetModel {
pub blocks: Vec<ConvNetBlock>,
pub head_scale: f32,
pub receptive_field_size: usize,
pub post_stack_head: Option<PostStackHead>,
pub head_output_scratch: AlignedVec<f32>,
pub prewarm_on_reset: bool,
pub linear_head: Option<LinearHead>,
/* private fields */
}Expand description
ConvNet feed-forward model.
Composed of a sequence of ConvNetBlocks chained sequentially,
followed by an optional PostStackHead and a final head_scale gain.
Unlike WaveNet, ConvNet has no gating, no rechannel projections, no condition_dsp, and no dual-array architecture. Each block’s output is the input of the next block directly.
Fields§
§blocks: Vec<ConvNetBlock>Sequential ConvNet blocks.
head_scale: f32Final voltage compensation scale (Target Output Scale).
receptive_field_size: usizeTotal receptive field (sum of all block RFs + head RF contribution).
post_stack_head: Option<PostStackHead>Optional post-stack head sub-object (Conv1D + activation).
head_output_scratch: AlignedVec<f32>Scratch buffer for post-stack head output.
prewarm_on_reset: boolWhether to execute prewarm during reset(). Default: true.
linear_head: Option<LinearHead>Optional C++ flat-format linear head weights (no activation).
Used when post_stack_head is None but the model has a separate
linear projection from in_ch → out_ch.
Implementations§
Source§impl ConvNetModel
impl ConvNetModel
Sourcepub fn in_channels(&self) -> usize
pub fn in_channels(&self) -> usize
Returns the number of input channels expected by the first block.
Sourcepub fn out_channels(&self) -> usize
pub fn out_channels(&self) -> usize
Returns the number of output channels produced by the model.
Trait Implementations§
Source§impl NamModel for ConvNetModel
impl NamModel for ConvNetModel
Source§fn process(&mut self, input: &[f32], output: &mut [f32])
fn process(&mut self, input: &[f32], output: &mut [f32])
Source§fn prewarm(&mut self, _num_samples: usize)
fn prewarm(&mut self, _num_samples: usize)
prewarm).Source§fn prewarm_samples(&self) -> usize
fn prewarm_samples(&self) -> usize
Source§fn set_max_buffer_size(&mut self, _max_buf: usize) -> Result<()>
fn set_max_buffer_size(&mut self, _max_buf: usize) -> Result<()>
Source§fn prewarm_on_reset(&self) -> bool
fn prewarm_on_reset(&self) -> bool
reset(). Read moreSource§fn set_prewarm_on_reset(&mut self, val: bool)
fn set_prewarm_on_reset(&mut self, val: bool)
reset(). Read moreAuto Trait Implementations§
impl Freeze for ConvNetModel
impl RefUnwindSafe for ConvNetModel
impl Send for ConvNetModel
impl Sync for ConvNetModel
impl Unpin for ConvNetModel
impl UnsafeUnpin for ConvNetModel
impl UnwindSafe for ConvNetModel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.