Resize OP doesn't work in Metal delegate with dynamic shape input in TFLite
@Kepnu4 Thanks for reporting the issue.

The supported for dynamic shapes by the TF Lite GPU Delegate is not available AFAIK. 

Also, when tflite [analyzer](https://www.tensorflow.org/lite/api_docs/python/tf/lite/experimental/Analyzer) is used, I could observe the following:

```
Subgraph#0 main(T#0) -> [T#10]
  Op#0 SHAPE(T#0) -> [T#4]
GPU COMPATIBILITY WARNING: Not supported op SHAPE
  Op#1 STRIDED_SLICE(T#4, T#3[1], T#2[3], T#3[1]) -> [T#5]
GPU COMPATIBILITY WARNING: STRIDED_SLICE supports for 3 or 4 dimensional tensors only.
  Op#2 CAST(T#5) -> [T#6]
GPU COMPATIBILITY WARNING: Not supported Cast case. Input type: INT64 and output type: FLOAT32
  Op#3 MUL(T#6, T#1) -> [T#7]
  Op#4 CAST(T#7) -> [T#8]
  Op#5 RESIZE_NEAREST_NEIGHBOR(T#0, T#8) -> [T#9]
GPU COMPATIBILITY WARNING: Expected 1 runtime input tensor(s), but node has 2 runtime input(s).
  Op#6 RELU(T#9) -> [T#10]
```
Please find the gist [here](https://colab.research.google.com/gist/pjpratik/c1373679cf3769e62df9310b22df0997/59911.ipynb) and the list of supported ML operations on GPU [here](https://www.tensorflow.org/lite/performance/gpu#supported_ops).

Thanks. Thanks @pjpratik, 
I find that dynamic shapes actually work in Metal delegate, for example this network with downsampling convolution works fine. So basically encoder part works but i can't obtain working decode parts because of upsampling. 
For unsupported operation i find it another problem, because resize got shape as input instead of upscaling factor. So it produces this shape operations when i just want to do 2x resize.

<img width="212" alt="image" src="https://user-images.githubusercontent.com/2921717/224312426-73b45c71-9831-41e0-932a-50a77b0e98f8.png">

[test_net.tflite.zip](https://github.com/tensorflow/tensorflow/files/10941936/test_net.tflite.zip)
 @Kepnu4 Thanks for the information

@sachinprasadhs could you please look into this. Thank you. I'm not entirely sure what you mean by dynamic shape.  Your network has a fixed shape of [1, 1, 1, 3], no?

Anyway, using the `SHAPE` op to extract the tensor dimensions and doing a runtime decision of what the tensor size should be is not supported.  Things need to be statically assigned. This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. @impjdi i don't know why it prints this shape in details, but if you run:
```tf.lite.experimental.Analyzer.analyze(model_path=out_path, gpu_compatibility=True)```
on the model it will print:
```
Your TFLite model has '1' subgraph(s). In the subgraph description below,
T# represents the Tensor numbers. For example, in Subgraph#0, the PAD op takes
tensor #0 and tensor #3 as input and produces tensor #4 as output.

Subgraph#0 main(T#0) -> [T#5]
  Op#0 PAD(T#0, T#3[0, 0, 1, 1, 1, ...]) -> [T#4]
  Op#1 CONV_2D(T#4, T#2, T#1) -> [T#5]

Tensors of Subgraph#0
  T#0(serving_default_image:0) shape_signature:[1, -1, -1, 3], type:FLOAT32
  T#1(convolution) shape:[3], type:FLOAT32 RO 12 bytes, buffer: 2, data:[0, 0, 0]
  T#2(convolution1) shape:[3, 3, 3, 3], type:FLOAT32 RO 324 bytes, buffer: 3, data:[0.0592289, -0.093541, 0.0682242, -0.0534223, -0.0468599, ...]
  T#3(Const) shape:[4, 2], type:INT32 RO 32 bytes, buffer: 4, data:[0, 0, 1, 1, 1, ...]
  T#4(Pad) shape_signature:[1, -1, -1, 3], type:FLOAT32
  T#5(PartitionedCall:0) shape_signature:[1, -1, -1, 3], type:FLOAT32


Your model looks compatible with GPU delegate with TFLite runtime version 2.12.0.
But it doesn't guarantee that your model works well with GPU delegate.
There could be some runtime incompatibililty happen.
```

As you can see the shape is `[1, -1, -1, 3]`. And it works when i resize tensors and pass input with different shapes.

Got it about `SHAPE`. But is there any way to upscale without using `SHAPE`? Because `CONV2D` with stride 2 doesn't require `SHAPE` and it downsamples tensors. Is there any way to upscale it back? Hi @Kepnu4, we currently do not support dynamic shapes. If it works, then trying to build on top of it will lead to issues down the road because the system doesn't expect that state. Are you able to continue your work with static shapes? This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/59911">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/59911">No</a>

Hello,
Resize OP doesn't work in Metal delegate with dynamic shape input in TFLite. Here is the small example of network which works on cpu but doesn't work with metal delegate with following error:
```
2023-03-06 15:01:06.317779+0400 TFLiteBenchmark[77147:6040306] Initialized TensorFlow Lite runtime.
INFO: Initialized TensorFlow Lite runtime.
2023-03-06 15:01:06.318869+0400 TFLiteBenchmark[77147:6040306] Created TensorFlow Lite delegate for Metal.
INFO: Created TensorFlow Lite delegate for Metal.
2023-03-06 15:01:06.320045+0400 TFLiteBenchmark[77147:6040306] Metal GPU Frame Capture Enabled
2023-03-06 15:01:06.322306+0400 TFLiteBenchmark[77147:6040306] Metal API Validation Enabled
INFO: GPU delegate created.
ERROR: Failed to apply GPU delegate.
```

Network graph:
<img width="344" alt="image" src="https://user-images.githubusercontent.com/2921717/223099424-03870ed2-16fc-4e67-a6d9-17ec2fe9c40f.png">

[test_net.tflite.zip](https://github.com/tensorflow/tensorflow/files/10897648/test_net.tflite.zip)


### System information

-   **iOS 15.1**:
-   **Iphone 11**:
-   **source**:
-   **v2.11.0**:
