def _crop(img: Tensor, cropping_shape: List[int]) -> Tensor:
    """Crop out the part of "valid" convolution area."""
    return pad(
        img,
        (
            -cropping_shape[4],
            -cropping_shape[5],
            -cropping_shape[2],
            -cropping_shape[3],
            -cropping_shape[0],
            -cropping_shape[1],
        ),
    )
Crop out the part of "valid" convolution area.
kornia/metrics/ssim3d.py