pub struct ProbePool { /* private fields */ }Expand description
Streaming softmax-weighted pooling over cells, one accumulator per probe.
Implementations§
Source§impl ProbePool
impl ProbePool
Sourcepub fn new(
probes: &[f32],
num_probes: usize,
d: usize,
) -> Result<Self, &'static str>
pub fn new( probes: &[f32], num_probes: usize, d: usize, ) -> Result<Self, &'static str>
probes is [num_probes, d], row-major.
pub fn num_probes(&self) -> usize
Sourcepub fn pooled_len(&self) -> usize
pub fn pooled_len(&self) -> usize
Width of the pooled output, num_probes * d_model.
Auto Trait Implementations§
impl Freeze for ProbePool
impl RefUnwindSafe for ProbePool
impl Send for ProbePool
impl Sync for ProbePool
impl Unpin for ProbePool
impl UnsafeUnpin for ProbePool
impl UnwindSafe for ProbePool
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