pub struct RlxVisionModel { /* private fields */ }Expand description
RLX-compiled NomicVision encoder (patch preprocess host-side, trunk on RLX).
Implementations§
Source§impl RlxVisionModel
impl RlxVisionModel
pub fn load_sized( config_path: &Path, weights_path: &str, batch: usize, ) -> Result<Self>
pub fn load_sized_on( config_path: &Path, weights_path: &str, batch: usize, device: Device, ) -> Result<Self>
Sourcepub fn forward(&mut self, pixel_values: &[f32], batch: usize) -> Vec<f32>
pub fn forward(&mut self, pixel_values: &[f32], batch: usize) -> Vec<f32>
Forward: pixel_values [batch, 3, img, img] row-major NCHW → CLS [batch, hidden].
pub fn forward_all( &mut self, pixel_values: &[f32], batch: usize, ) -> Vec<Vec<f32>>
pub fn forward_slots(&mut self, hidden: &[f32]) -> (*const f32, usize)
pub fn img_size(&self) -> usize
pub fn patch_size(&self) -> usize
pub fn num_patches(&self) -> usize
pub fn preprocess_weights(&self) -> &VisionPreprocessWeights
Auto Trait Implementations§
impl Freeze for RlxVisionModel
impl !RefUnwindSafe for RlxVisionModel
impl Send for RlxVisionModel
impl !Sync for RlxVisionModel
impl Unpin for RlxVisionModel
impl UnsafeUnpin for RlxVisionModel
impl !UnwindSafe for RlxVisionModel
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more