pub struct SamDecoderConfig {
pub transformer_dim: usize,
pub transformer_depth: usize,
pub transformer_num_heads: usize,
pub transformer_mlp_dim: usize,
pub num_mask_tokens: usize,
pub iou_head_depth: usize,
pub iou_head_hidden_dim: usize,
pub layer_norm_eps: f64,
}Expand description
Mask decoder configuration. Same across SAM variants.
Fields§
§transformer_dim: usize§transformer_depth: usize§transformer_num_heads: usize§transformer_mlp_dim: usize§num_mask_tokens: usize4 = 1 IoU token + 3 mask tokens; downstream code picks one or
all three depending on multimask_output.
iou_head_depth: usize§layer_norm_eps: f64Trait Implementations§
Source§impl Clone for SamDecoderConfig
impl Clone for SamDecoderConfig
Source§fn clone(&self) -> SamDecoderConfig
fn clone(&self) -> SamDecoderConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SamDecoderConfig
impl Debug for SamDecoderConfig
Source§impl Default for SamDecoderConfig
impl Default for SamDecoderConfig
Source§fn default() -> SamDecoderConfig
fn default() -> SamDecoderConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SamDecoderConfig
impl RefUnwindSafe for SamDecoderConfig
impl Send for SamDecoderConfig
impl Sync for SamDecoderConfig
impl Unpin for SamDecoderConfig
impl UnsafeUnpin for SamDecoderConfig
impl UnwindSafe for SamDecoderConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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