pub struct MultiCropConfig {
pub global_crop_size: usize,
pub local_crop_size: usize,
pub n_local_crops: usize,
}Expand description
Multi-crop configuration.
Fields§
§global_crop_size: usizeTarget spatial size of each global crop (e.g. 224).
local_crop_size: usizeTarget spatial size of each local crop (e.g. 96).
n_local_crops: usizeNumber of additional local crops per image (default 6).
Implementations§
Source§impl MultiCropConfig
impl MultiCropConfig
Sourcepub fn new(
global_crop_size: usize,
local_crop_size: usize,
n_local_crops: usize,
) -> SslResult<Self>
pub fn new( global_crop_size: usize, local_crop_size: usize, n_local_crops: usize, ) -> SslResult<Self>
Validated config.
§Errors
SslError::InvalidNumCropsifn_local_crops < 1.SslError::EmptyInputif either crop size is zero.
Trait Implementations§
Source§impl Clone for MultiCropConfig
impl Clone for MultiCropConfig
Source§fn clone(&self) -> MultiCropConfig
fn clone(&self) -> MultiCropConfig
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 MultiCropConfig
impl Debug for MultiCropConfig
Auto Trait Implementations§
impl Freeze for MultiCropConfig
impl RefUnwindSafe for MultiCropConfig
impl Send for MultiCropConfig
impl Sync for MultiCropConfig
impl Unpin for MultiCropConfig
impl UnsafeUnpin for MultiCropConfig
impl UnwindSafe for MultiCropConfig
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