The structure of the model generated is incorrect, the input tensors of the concatenate operator have changed from 4 different tensors to 3 different tensors plus one duplicated tensor
All the details are in the colab file, and I would like to know if this situation is a bug or an internal optimization of the converter. If it is an optimization, can I turn it off because I only want the model structure for later use and not for inference speed. Thank you for your help. @Sun2018421 
I was able to reproduce the issue on colab using TF v2.11. Please find the gist [here](https://colab.research.google.com/gist/tiruk007/92b83900215f08fef3ea53a1dc9e5dfe/tflite.ipynb) for reference. It seems like we have to dig more into this issue, we will update soon here.

Thank you! Okay, Thank you @Sun2018421 Sorry for the delayed response.

The tflite converter may flatten/prune the graph during conversion process for better optimization. If the model structure needs to be retained, the converter can be used with just using select ops. Please refer the [gist](https://colab.research.google.com/gist/pjpratik/c0d1aaddce410eca58a3b5cdd35cd926/59662.ipynb).

Also, we can use [TFLite Model Anylzer](https://www.tensorflow.org/lite/guide/model_analyzer) to analyze tflite model structure and [Quantization Debugger](https://www.tensorflow.org/lite/performance/quantization_debugger) to assist the quantization debugging process. 

Thanks! Thank you very much, I will go read and understand it. As you mentioned, "the converter can be used with just using select ops". Do you have any related information about the converter? Thank you. The docs that I know are https://www.tensorflow.org/lite/convert?hl=zh-cn. @Sun2018421 As per the select ops [documentation](https://www.tensorflow.org/lite/guide/ops_select), the select ops can be used for the ops which are not present in TFLite builtins. But using select ops might increase Tensorflow Lite binary size. 

I have observed that when just select ops is used, the concat operator is indeed taking four different inputs but not in the case when tflite builtins are added when observed in the [gist](https://colab.research.google.com/gist/pjpratik/c0d1aaddce410eca58a3b5cdd35cd926/59662.ipynb).

![image](https://user-images.githubusercontent.com/118897289/219879317-7f53548e-e9c7-4155-ab01-2f33d3379c3d.png)


May I know the use case of requiring model structure but not for inference speed? Thanks. Thank you very much for your help. I will go and take a look, as my current work focuses on operator scheduling and intermediate tensor memory, as mentioned in the [paper](https://arxiv.org/abs/2003.02369) Therefore, I would prefer to have a clear network structure for analysis. I am not an experienced researcher, so my naive questions may have caused you some trouble. Thanks again for your help. Sorry for the feedback for so long, when i check the network structure in [gist](https://colab.research.google.com/gist/pjpratik/c0d1aaddce410eca58a3b5cdd35cd926/59662.ipynb#scrollTo=DsRBbVLeL_9x), I find it still has 1 repeated input, Op#68 FlexConcatV2(T#216, T#217, T#218, T#217, T#2[1]) -> [T#219]. I am trying select ops or tflite builtins , but i am working on some errors when converting.  Thanks very much. Hi @Sun2018421, Thanks for the information.

@sachinprasadhs Could you please look into this issue. Thanks! Hi, The code which you have provided is quite large to debug. 
Could you please provide simple reproducible example and attach the Gist. Thanks! 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/59662">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/59662">No</a>

### 1. System information

- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): windos10
- TensorFlow installation (pip package or built from source): pip
- TensorFlow library (version, if pip package or github SHA, if built from source): version 2.9.1 

### 2. Code

Provide code to help us reproduce your issues using one of the following options:

#### Option B: Paste your code here or provide a link to a custom end-to-end colab

This is the file weblink https://colab.research.google.com/gist/Sun2018421/73059bdd906fd84313f3dd7714cbcc7e/tflite.ipynb

### 3. Failure after conversion
If the conversion is successful, but the generated model is wrong, then state what is wrong:
It seems like there is an error in the structure of the model generated. The original structure of the concatenate operator with 4 different inputs has become 3 different inputs and 1 repeated input.

### 4. (optional) RNN conversion support
If converting TF RNN to TFLite fused RNN ops, please prefix [RNN] in the title.
Not a RNN
### 5. (optional) Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
