pub struct Sam2FpnNeckWeights {
pub conv_w: Vec<Vec<f32>>,
pub conv_b: Vec<Vec<f32>>,
pub d_model: usize,
pub backbone_channel_list: Vec<usize>,
pub fpn_top_down_levels: Vec<usize>,
pub nearest: bool,
}Expand description
Weights for the FPN neck — one 1×1 conv (weight + bias) per
backbone level. Stored coarse → fine to match the checkpoint’s
image_encoder.neck.convs.{i}.conv.{weight,bias} ordering.
Fields§
§conv_w: Vec<Vec<f32>>[d_model, backbone_channel_list[i]] per level (1×1 conv = a
per-pixel linear, so the kernel dims collapse).
conv_b: Vec<Vec<f32>>§d_model: usize§backbone_channel_list: Vec<usize>§fpn_top_down_levels: Vec<usize>§nearest: boolAuto Trait Implementations§
impl Freeze for FpnNeckWeights
impl RefUnwindSafe for FpnNeckWeights
impl Send for FpnNeckWeights
impl Sync for FpnNeckWeights
impl Unpin for FpnNeckWeights
impl UnsafeUnpin for FpnNeckWeights
impl UnwindSafe for FpnNeckWeights
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