pub fn random_crop_2d(
input: &ArrayD<f64>,
crop_h: usize,
crop_w: usize,
rng: &mut AugRng,
) -> Result<ArrayD<f64>, AugmentationError>Expand description
Random 2-D crop: extract a sub-array of size [.., crop_h, crop_w] at a random position.
Input must have at least 2 dimensions. All leading batch/channel dimensions are preserved.