See :class:`~torchvision.transforms.v2.RandomCrop` for details.
(inpt: torch.Tensor, top: int, left: int, height: int, width: int)
| 1782 | |
| 1783 | |
| 1784 | def crop(inpt: torch.Tensor, top: int, left: int, height: int, width: int) -> torch.Tensor: |
| 1785 | """See :class:`~torchvision.transforms.v2.RandomCrop` for details.""" |
| 1786 | if torch.jit.is_scripting(): |
| 1787 | return crop_image(inpt, top=top, left=left, height=height, width=width) |
| 1788 | |
| 1789 | _log_api_usage_once(crop) |
| 1790 | |
| 1791 | kernel = _get_kernel(crop, type(inpt)) |
| 1792 | return kernel(inpt, top=top, left=left, height=height, width=width) |
| 1793 | |
| 1794 | |
| 1795 | @_register_kernel_internal(crop, torch.Tensor) |
nothing calls this directly
no test coverage detected
searching dependent graphs…