Padding type for the pooling layer 'PoolingLayerBuilder (MEAN)_57' is not set
@Varfalamei The error message "Error reading protobuf spec. validator error: Padding type for the pooling layer 'PoolingLayerBuilder (MEAN)_57' is not set." indicates that you haven't specified the padding behavior for the pooling layer with index 57 in your TensorFlow model. Please refer to the compatibility guide for supported operators and layers: https://www.tensorflow.org/lite/guide/ops_compatibility.
Thank you! 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/62902">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/62902">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

binary

### TensorFlow version

2.13.0

### Custom code

Yes

### OS platform and distribution

20.04

### Mobile device

Iphone 15

### Python version

3.9

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

I’m trying to convert the tf efficientnetv2s model to tflite format so that I can then use it on iOS with the CoreML delegate, but I encountered the problem:
`Error compiling model compiler error: Error reading protobuf spec. validator error: Padding type for the pooling layer 'PoolingLayerBuilder (MEAN)_57' is not set.`
Is there a normal way to solve this problem? So far, only translating directly into CoreML has helped, but I still want to understand the problem and how to solve it.
It is also worth clarifying that the model runs on Android with different delegates and on iOS with the Metal delegate

### Standalone code to reproduce the issue

```shell
# code for convert model
from tensorflow.keras.applications.efficientnet_v2 import EfficientNetV2S
from albumentations import Compose, LongestMaxSize, Normalize, PadIfNeeded
import tensorflow as tf
from typing import Dict, List, Any, Optional, Tuple
from pathlib import Path
import numpy as np


mean = (0.485, 0.456, 0.406)
std = (0.229, 0.224, 0.225)
input_size = (128, 128)


def preprocess_input(
    input: List[np.ndarray],
    image_size: Tuple[int, int] = (128, 128),
    mean: Tuple[float, float, float] = (0.485, 0.456, 0.406),
    std: Tuple[float, float, float] = (0.229, 0.224, 0.225),
) -> np.ndarray:
    width, height = image_size
    transforms = Compose(
        [
            LongestMaxSize(max_size=max(image_size)),
            PadIfNeeded(width, height, border_mode=cv2.BORDER_CONSTANT, value=0),
            Normalize(mean=mean, std=std),
        ]
    )
    res = np.array([transforms(image=np.array(item))["image"] for item in input])
    return res


def normalize_func(
    image: np.ndarray,
    mean: Optional[Tuple[float, float, float]] = mean,
    std: Optional[Tuple[float, float, float]] = std,
    max_pixel_value: float = 255.0,
) -> np.ndarray:
    if mean is not None and std is not None:
        mean = tf.convert_to_tensor(mean, dtype=tf.float32)
        std = tf.convert_to_tensor(std, dtype=tf.float32)
        mean *= max_pixel_value
        std *= max_pixel_value
        denominator = tf.math.reciprocal(std)
        image -= mean
        image *= denominator
    return image


preprocess_input_img_size = lambda x: preprocess_input(x, input_size)  # noqa

    
base_model = EfficientNetV2S(input_shape=(128, 128, 3), include_top=False)
model = tf.keras.Sequential(
    [
        base_model,
        tf.keras.layers.GlobalAveragePooling2D(),
        tf.keras.layers.Dropout(rate=0.5),
        tf.keras.layers.Dense(1500, activation="softmax"),
    ]
)

@tf.function(input_signature=[tf.TensorSpec(shape=(1, 128, 128, 3), dtype=tf.uint8)])
def tf_model(image):
    image = tf.cast(image, tf.float32)
    image = normalize_func(image)
    predictions = model(image)
    return predictions


tf_model_func = tf_model.get_concrete_function()
converter = tf.lite.TFLiteConverter.from_concrete_functions([tf_model_func])
tflite_model = converter.convert()
tflite_model_file = Path('models/20240201_efficientnetv2s_model.tflite')
tflite_model_file.write_bytes(tflite_model)

# Then I use the model in swift app with CoreML Delegate
```


### Relevant log output

```shell
TensorFlow Lite Error: Failed to Compile and save Model.
TensorFlow Lite Error: CoreMl Kernel was not initialized
TensorFlow Lite Error: Node number 505 (TfLiteCoreMlDelegate) failed to prepare.
TensorFlow Lite Error: Restored original execution plan after delegate application failure.
"Temp folder items count after clean: 0"
TensorFlow Lite Error: keep_dims should be true for Mean op.
CoreML delegate: 500 nodes delegated out of 505 nodes, with 2 partitions.
INFO: CoreML delegate: 500 nodes delegated out of 505 nodes, with 2 partitions.

Error compiling model compiler error: Error reading protobuf spec. validator error: Padding type for the pooling layer 'PoolingLayerBuilder (MEAN)_57' is not set.
TensorFlow Lite Error: Failed to Compile and save Model.
TensorFlow Lite Error: CoreMl Kernel was not initialized
TensorFlow Lite Error: Node number 505 (TfLiteCoreMlDelegate) failed to prepare.
TensorFlow Lite Error: Restored original execution plan after delegate application failure.
"Temp folder items count after clean: 0"
TensorFlow Lite Error: keep_dims should be true for Mean op.
CoreML delegate: 500 nodes delegated out of 505 nodes, with 2 partitions.
INFO: CoreML delegate: 500 nodes delegated out of 505 nodes, with 2 partitions.

Error compiling model compiler error: Error reading protobuf spec. validator error: Padding type for the pooling layer 'PoolingLayerBuilder (MEAN)_57' is not set.
TensorFlow Lite Error: Failed to Compile and save Model.
TensorFlow Lite Error: CoreMl Kernel was not initialized
TensorFlow Lite Error: Node number 505 (TfLiteCoreMlDelegate) failed to prepare.
TensorFlow Lite Error: Restored original execution plan after delegate application failure.
"Temp folder items count after clean: 0"
TensorFlow Lite Error: keep_dims should be true for Mean op.
CoreML delegate: 500 nodes delegated out of 505 nodes, with 2 partitions.
INFO: CoreML delegate: 500 nodes delegated out of 505 nodes, with 2 partitions.

Error compiling model compiler error: Error reading protobuf spec. validator error: Padding type for the pooling layer 'PoolingLayerBuilder (MEAN)_57' is not set.
TensorFlow Lite Error: Failed to Compile and save Model.
TensorFlow Lite Error: CoreMl Kernel was not initialized
TensorFlow Lite Error: Node number 505 (TfLiteCoreMlDelegate) failed to prepare.
TensorFlow Lite Error: Restored original execution plan after delegate application failure.
"Temp folder items count after clean: 0"
TensorFlow Lite Error: keep_dims should be true for Mean op.
CoreML delegate: 500 nodes delegated out of 505 nodes, with 2 partitions.
INFO: CoreML delegate: 500 nodes delegated out of 505 nodes, with 2 partitions.

Error compiling model compiler error: Error reading protobuf spec. validator error: Padding type for the pooling layer 'PoolingLayerBuilder (MEAN)_57' is not set.
TensorFlow Lite Error: Failed to Compile and save Model.
TensorFlow Lite Error: CoreMl Kernel was not initialized
TensorFlow Lite Error: Node number 505 (TfLiteCoreMlDelegate) failed to prepare.
TensorFlow Lite Error: Restored original execution plan after delegate application failure.
"Temp folder items count after clean: 0"
Runner/ModelLoader.swift:71: Assertion failed
```
