See :class:`~torchvision.transforms.v2.RandomResizedCrop` for details.
(
inpt: torch.Tensor,
top: int,
left: int,
height: int,
width: int,
size: list[int],
interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR,
antialias: Optional[bool] = True,
)
| 2660 | |
| 2661 | |
| 2662 | def resized_crop( |
| 2663 | inpt: torch.Tensor, |
| 2664 | top: int, |
| 2665 | left: int, |
| 2666 | height: int, |
| 2667 | width: int, |
| 2668 | size: list[int], |
| 2669 | interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, |
| 2670 | antialias: Optional[bool] = True, |
| 2671 | ) -> torch.Tensor: |
| 2672 | """See :class:`~torchvision.transforms.v2.RandomResizedCrop` for details.""" |
| 2673 | if torch.jit.is_scripting(): |
| 2674 | return resized_crop_image( |
| 2675 | inpt, |
| 2676 | top=top, |
| 2677 | left=left, |
| 2678 | height=height, |
| 2679 | width=width, |
| 2680 | size=size, |
| 2681 | interpolation=interpolation, |
| 2682 | antialias=antialias, |
| 2683 | ) |
| 2684 | |
| 2685 | _log_api_usage_once(resized_crop) |
| 2686 | |
| 2687 | kernel = _get_kernel(resized_crop, type(inpt)) |
| 2688 | return kernel( |
| 2689 | inpt, |
| 2690 | top=top, |
| 2691 | left=left, |
| 2692 | height=height, |
| 2693 | width=width, |
| 2694 | size=size, |
| 2695 | interpolation=interpolation, |
| 2696 | antialias=antialias, |
| 2697 | ) |
| 2698 | |
| 2699 | |
| 2700 | @_register_kernel_internal(resized_crop, torch.Tensor) |
nothing calls this directly
no test coverage detected
searching dependent graphs…