Repository: kornia/kornia

Issue:
Crash on resize inverse - missing flag padding_mode
### Describe the bug

The inverse of resize augmentation crashes since the `padding_mode` flag is not set:

```
  File "/home/miquelmr/kornia/kornia/augmentation/_2d/geometric/base.py", line 106, in inverse
    output = self.inverse_transform(in_tensor, flags=flags, transform=transform, size=size)
  File "/home/miquelmr/kornia/kornia/augmentation/_2d/geometric/resize.py", line 88, in inverse_transform
    input, transform[:, :2, :], size, flags["resample"], flags["padding_mode"], flags["align_corners"]
KeyError: 'padding_mode
```

### Reproduction steps

```bash
import kornia.augmentation as K
import torch

img = torch.zeros((3,5,5))

aug = K.Resize(2)

transformed = aug(img)
img_transformed_inv = aug.inverse(transformed)
```


### Expected behavior

No crash

### Environment

```shell
Collecting environment information...
PyTorch version: 1.10.2
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.17

Python version: 3.7.15 (default, Nov 24 2022, 21:12:53)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-4.15.0-196-generic-x86_64-with-debian-buster-sid
Is CUDA available: False
CUDA runtime version: Could not collect
GPU models and configuration: 
GPU 0: NVIDIA TITAN X (Pascal)
GPU 1: NVIDIA TITAN X (Pascal)
GPU 2: NVIDIA TITAN Xp

Nvidia driver version: 520.61.05
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] mypy==0.991
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.5
[pip3] torch==1.10.2
[pip3] torchvision==0.2.2
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               10.2.89              hfd86e86_1  
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-service               2.4.0            py37h7f8727e_0  
[conda] mkl_fft                   1.3.1            py37hd3c417c_0  
[conda] mkl_random                1.2.2            py37h51133e4_0  
[conda] mypy                      0.991                    pypi_0    pypi
[conda] mypy-extensions           0.4.3                    pypi_0    pypi
[conda] numpy                     1.21.5           py37h6c91a56_3  
[conda] numpy-base                1.21.5           py37ha15fc14_3  
[conda] pytorch                   1.10.2          cpu_py37hfa7516b_0  
[conda] torchvision               0.2.2                      py_3    pytorch
```


### Additional context

_No response_


Discussion:

Resolving patch:
diff --git a/kornia/augmentation/_2d/geometric/resize.py b/kornia/augmentation/_2d/geometric/resize.py
--- a/kornia/augmentation/_2d/geometric/resize.py
+++ b/kornia/augmentation/_2d/geometric/resize.py
@@ -85,7 +85,7 @@ def inverse_transform(
             raise TypeError(f'Expected the transform be a Tensor. Gotcha {type(transform)}')
 
         return crop_by_transform_mat(
-            input, transform[:, :2, :], size, flags["resample"], flags["padding_mode"], flags["align_corners"]
+            input, transform[:, :2, :], size, flags["resample"].name.lower(), "zeros", flags["align_corners"]
         )
 
 


Test patch:
diff --git a/test/augmentation/test_augmentation.py b/test/augmentation/test_augmentation.py
--- a/test/augmentation/test_augmentation.py
+++ b/test/augmentation/test_augmentation.py
@@ -3628,6 +3628,7 @@ def test_smoke(self, device, dtype):
         aug = Resize(size=(4, 5))
         out = aug(img)
         assert out.shape == (1, 1, 4, 5)
+        assert aug.inverse(out).shape == (1, 1, 4, 6)
 
 
 class TestSmallestMaxSize: