pub struct PointTransformerLayer { /* private fields */ }Expand description
A single Point Transformer vector-attention layer.
Implementations§
Source§impl PointTransformerLayer
impl PointTransformerLayer
Sourcepub fn new(cfg: PointTransformerConfig, rng: &mut LcgRng) -> Self
pub fn new(cfg: PointTransformerConfig, rng: &mut LcgRng) -> Self
Construct a layer with randomly-initialised weights.
Sourcepub fn config(&self) -> &PointTransformerConfig
pub fn config(&self) -> &PointTransformerConfig
Read-only configuration access.
Sourcepub fn forward(
&self,
points: &[f32],
features: &[f32],
n_points: usize,
) -> VisionResult<Vec<f32>>
pub fn forward( &self, points: &[f32], features: &[f32], n_points: usize, ) -> VisionResult<Vec<f32>>
Forward pass returning only the output features [n_points × out_dim].
§Errors
Sourcepub fn forward_detailed(
&self,
points: &[f32],
features: &[f32],
n_points: usize,
) -> VisionResult<PointAttention>
pub fn forward_detailed( &self, points: &[f32], features: &[f32], n_points: usize, ) -> VisionResult<PointAttention>
Forward pass exposing neighbourhoods and per-channel attention weights.
§Errors
VisionError::EmptyInputifn_points == 0.VisionError::DimensionMismatchifpoints.len() != n_points * 3orfeatures.len() != n_points * in_dim.VisionError::NonFiniteif any output is non-finite.
Sourcepub fn forward_zero_position(
&self,
points: &[f32],
features: &[f32],
n_points: usize,
) -> VisionResult<PointAttention>
pub fn forward_zero_position( &self, points: &[f32], features: &[f32], n_points: usize, ) -> VisionResult<PointAttention>
Forward pass with the position encoding δ forced to zero — used to
verify that δ genuinely influences the output.
§Errors
Auto Trait Implementations§
impl Freeze for PointTransformerLayer
impl RefUnwindSafe for PointTransformerLayer
impl Send for PointTransformerLayer
impl Sync for PointTransformerLayer
impl Unpin for PointTransformerLayer
impl UnsafeUnpin for PointTransformerLayer
impl UnwindSafe for PointTransformerLayer
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