Repository: opencv
Issue:  Can't parse layer for node='layer_normalization/strided_slice' of type='StridedSlice'
Labels: bug,category: dnn,confirmed

### System Information

**C++ version details**
OpenCV version: 4.6.0 (but I also checked the issue exists in the latest OpenCV Python release version 4.7.0 as below)
Operating System / Platform: Windows 10
Compiler & compiler version: GCC 8.1.0

**Python version details**
OpenCV python version: 4.7.0
Operating System / Platform: Window 10
Python version: 3.9.0

### Detailed description

According to [here](https://docs.opencv.org/4.x/d6/d87/group__dnnLayerList.html), cv::dnn::LayerNormLayer is a supported layer.

However, loading a Tensorflow net containing a LayerNormalization layer into OpenCV using cv::dnn::readNet (C++) or cv2.dnn.readNet (Python) generates the following error:

```
[ERROR:0@0.218] global tf_importer.cpp:3182 cv::dnn::dnn4_v20221220::`anonymous-namespace'::TFImport
er::parseNode DNN/TF: Can't parse layer for node='generator/layer_normalization/strided_slice_3' of
type='StridedSlice'. Exception: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\sr
c\tensorflow\tf_importer.cpp:2822: error: (-2:Unspecified error) Input layer not found: generator/la
yer_normalization/Shape in function 'cv::dnn::dnn4_v20221220::`anonymous-namespace'::TFImporter::con
nect'

Traceback (most recent call last):
  File "MWE.py", line 36, in <module>
    model = cv2.dnn.readNet(os.getcwd() + os.sep + "mwe.pb");
cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\tensorflow\tf_impor
ter.cpp:2822: error: (-2:Unspecified error) Input layer not found: generator/layer_normalization/Sha
pe in function 'cv::dnn::dnn4_v20221220::`anonymous-namespace'::TFImporter::connect'
```

The mention of strided slice led me to [this](https://github.com/opencv/opencv/issues/9682), however, I was unable to get optimize_for_inference.py to work for me. It may be related, but I'm not sure it's the same issue.

### Steps to reproduce

This Python code creates a Keras model (I'm using version 2.11.0) containing a Conv2D layer, and a LayerNormalization layer; freezes and saves the model, and then attempts to load it into OpenCV, generating an error.

If you change 'outputs' parameter to 'convolved' as per the comment in the 'create_model(...)' function, then the problem goes away, indicating that LayerNormalization is the issue.

I actually want to load my pb model into the C++ version of OpenCV, but it was easier to demonstrate the issue in a MWE in one Python code. The same issue applies to both cv::dnn::readNet (C++) and cv2.dnn.readNet (Python). It all relates to the readNet() command in either version anyway.

```
import tensorflow as tf
from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2
import os
import cv2

def create_model():
    input = tf.keras.layers.Input(shape = (512, 512, 3), name = "gen_input_image")
    convolved = tf.keras.layers.Conv2D(128, kernel_size = 4)(input)
    normalized = tf.keras.layers.LayerNormalization()(convolved) # this line is the problem
    return tf.keras.Model(inputs = input, outputs = normalized, name = "generator") # change outputs to convolved and the problem goes away

def save_weights():
    model = create_model()
    # freeze graph
    full_model = tf.function(lambda inputs: model(inputs))
    full_model = full_model.get_concrete_function(tf.TensorSpec(model.inputs[0].shape, model.inputs[0].dtype))
    frozen_func = convert_variables_to_constants_v2(full_model)
    frozen_func.graph.as_graph_def()
    tf.io.write_graph(graph_or_graph_def = frozen_func.graph, logdir = os.getcwd(), name = "mwe.pb", as_text = False)

if __name__ == "__main__":
    save_weights()
    model = cv2.dnn.readNet(os.getcwd() + os.sep + "mwe.pb"); # generates the error
```

I've also uploaded the model here in [mwe.zip](https://github.com/opencv/opencv/files/11871079/mwe.zip), so you can skip the Tensorflow / Keras part of the code above, and then the relevant MWE code is just the last line.

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)