NNAPI invalid dimensions error on Android

Hi, I am trying to run a small UNet-like Image2Image model on Android using NNAPI, I have successfully converted it with NNAPI, but when I run it on my android app, I am getting the following error. What’s the cause of this?

E/CpuExecutor: Invalid dimensions for model operand: packages/modules/NeuralNetworks/common/TypeUtils.cpp:198: Incompatible dimensions: [1, 128, 55, 55] and [1, 128, 56, 55]
E/CpuExecutor: STRIDED_SLICE failed.
E/AndroidRuntime: FATAL EXCEPTION: Thread-4

Without NNAPI the model works as expected, but after NNAPI conversion the model has the error. This is probably due to ConvTranspose2d. I am using it with the following parameters. Are there any workarounds?
torch.nn.ConvTranspose2d(in, out, kernel_size=3, padding=1, output_padding=1, stride=2)

I figured out the cause. The cause was not ConvTranspose2d, but the use of slices as shown below:
dec = self.dec(enc)[:, :, :prev_enc.size(2), :prev_enc.size(3)]
Looks like it caused the incompatible dimensions error.