Skip to main content

PatchEmbedMeta

Trait PatchEmbedMeta 

Source
pub trait PatchEmbedMeta {
    // Required methods
    fn input_resolution(&self) -> [usize; 2];
    fn d_input(&self) -> usize;
    fn patch_size(&self) -> usize;
    fn d_output(&self) -> usize;
    fn enable_patch_norm(&self) -> bool;

    // Provided methods
    fn input_height(&self) -> usize { ... }
    fn input_width(&self) -> usize { ... }
    fn patches_resolution(&self) -> [usize; 2] { ... }
    fn patches_height(&self) -> usize { ... }
    fn patches_width(&self) -> usize { ... }
    fn num_patches(&self) -> usize { ... }
}
Expand description

Common introspection interface for PatchEmbed modules.

Required Methods§

Source

fn input_resolution(&self) -> [usize; 2]

Input resolution (height, width).

Source

fn d_input(&self) -> usize

Input feature dimension size.

Source

fn patch_size(&self) -> usize

The size of each patch.

Source

fn d_output(&self) -> usize

Output feature dimension size.

Source

fn enable_patch_norm(&self) -> bool

Enable patch normalization.

Provided Methods§

Source

fn input_height(&self) -> usize

Input height.

Source

fn input_width(&self) -> usize

Input width.

Source

fn patches_resolution(&self) -> [usize; 2]

Image resolution, measured in patches.

Source

fn patches_height(&self) -> usize

Height of the image, measured in patches.

Source

fn patches_width(&self) -> usize

Width of the image, measured in patches.

Source

fn num_patches(&self) -> usize

Total number of patches.

Implementors§