[][src]Function tch::vision::dataset::random_crop

pub fn random_crop(t: &Tensor, pad: i64) -> Tensor

Pad the image using reflections and take some random crops. This expects a 4 dimension NCHW tensor and returns a tensor with an identical shape.