See :class:`~torchvision.transforms.v2.CenterCrop` for details.
(inpt: torch.Tensor, output_size: list[int])
| 2515 | |
| 2516 | |
| 2517 | def center_crop(inpt: torch.Tensor, output_size: list[int]) -> torch.Tensor: |
| 2518 | """See :class:`~torchvision.transforms.v2.CenterCrop` for details.""" |
| 2519 | if torch.jit.is_scripting(): |
| 2520 | return center_crop_image(inpt, output_size=output_size) |
| 2521 | |
| 2522 | _log_api_usage_once(center_crop) |
| 2523 | |
| 2524 | kernel = _get_kernel(center_crop, type(inpt)) |
| 2525 | return kernel(inpt, output_size=output_size) |
| 2526 | |
| 2527 | |
| 2528 | def _center_crop_parse_output_size(output_size: list[int]) -> list[int]: |
nothing calls this directly
no test coverage detected
searching dependent graphs…