pub struct BlockMasking {
pub num_targets: usize,
pub target_scale: (f64, f64),
pub target_aspect_ratio: (f64, f64),
}Expand description
Block masking for images (I-JEPA style).
Masks one or more contiguous rectangular blocks as targets, with the remaining patches as context. This forces the model to predict large semantic regions from partial observations.
Fields§
§num_targets: usizeNumber of target blocks to mask.
target_scale: (f64, f64)Target block scale range as fraction of total patches: (min, max).
target_aspect_ratio: (f64, f64)Target block aspect ratio range: (min, max).
Trait Implementations§
Source§impl Clone for BlockMasking
impl Clone for BlockMasking
Source§fn clone(&self) -> BlockMasking
fn clone(&self) -> BlockMasking
Returns a duplicate of the value. Read more
1.0.0 · 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 BlockMasking
impl Debug for BlockMasking
Source§impl MaskingStrategy for BlockMasking
impl MaskingStrategy for BlockMasking
Source§fn generate_mask(&self, shape: &InputShape, rng: &mut impl Rng) -> MaskSpec
fn generate_mask(&self, shape: &InputShape, rng: &mut impl Rng) -> MaskSpec
Generate a mask for a given input shape. Read more
Auto Trait Implementations§
impl Freeze for BlockMasking
impl RefUnwindSafe for BlockMasking
impl Send for BlockMasking
impl Sync for BlockMasking
impl Unpin for BlockMasking
impl UnsafeUnpin for BlockMasking
impl UnwindSafe for BlockMasking
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