pub struct Sam2MemoryEncoderWeights {Show 15 fields
pub mask_downsampler: Sam2MaskDownSamplerWeights,
pub prefix: Option<Sam2MemoryPrefixCompiled>,
pub mask_down: Option<Sam2MemoryMaskDownCompiled>,
pub pix_proj: Option<Sam2MemoryConv1x1Compiled>,
pub fuser_ir: Option<Sam2MemoryFuserCompiled>,
pub out_proj_ir: Option<Sam2MemoryConv1x1Compiled>,
pub pix_feat_proj_w: Vec<f32>,
pub pix_feat_proj_b: Vec<f32>,
pub fuser: Sam2FuserWeights,
pub out_proj_w: Option<Vec<f32>>,
pub out_proj_b: Option<Vec<f32>>,
pub in_dim: usize,
pub out_dim: usize,
pub pe_num_pos_feats: usize,
pub pe_temperature: f32,
}Fields§
§mask_downsampler: Sam2MaskDownSamplerWeights§prefix: Option<Sam2MemoryPrefixCompiled>§mask_down: Option<Sam2MemoryMaskDownCompiled>§pix_proj: Option<Sam2MemoryConv1x1Compiled>§fuser_ir: Option<Sam2MemoryFuserCompiled>§out_proj_ir: Option<Sam2MemoryConv1x1Compiled>§pix_feat_proj_w: Vec<f32>§pix_feat_proj_b: Vec<f32>§fuser: Sam2FuserWeights§out_proj_w: Option<Vec<f32>>out_proj: 1×1 conv in_dim → out_dim. None when in_dim == out_dim
(PyTorch nn.Identity in the reference).
out_proj_b: Option<Vec<f32>>§in_dim: usize§out_dim: usize§pe_num_pos_feats: usize§pe_temperature: f32Auto Trait Implementations§
impl !RefUnwindSafe for Sam2MemoryEncoderWeights
impl !Sync for Sam2MemoryEncoderWeights
impl !UnwindSafe for Sam2MemoryEncoderWeights
impl Freeze for Sam2MemoryEncoderWeights
impl Send for Sam2MemoryEncoderWeights
impl Unpin for Sam2MemoryEncoderWeights
impl UnsafeUnpin for Sam2MemoryEncoderWeights
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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