Function tch::vision::dataset::random_crop
source · pub fn random_crop(t: &Tensor, pad: i64) -> Tensor
Expand description
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.