tflite RNN model invoke failed with "num_input_elements != num_output_elements (4288 != 64)Node number 18 (RESHAPE) failed to prepare.Node number 5 (WHILE) failed to invoke."
Hi @pkgoogle,

I am trying to reproduce the issue, meanwhile i got a similar Runtime error related to Batch MATMUL. Here is the screenshot. Please take a look.

![image](https://github.com/tensorflow/tensorflow/assets/149650845/9dabdc4a-b0ad-49e8-9fa8-4cb2a1b34e3a)

Thank You I was able to replicate both (the difference is the versions), I was also able to replicate the BATCH_MATMUL issue on [tf-nightly](https://colab.sandbox.google.com/gist/pkgoogle/d121bc1945adb3e953ba322093a429e3/62840.ipynb). @yijie-yang, can you please take a look? Thanks. I have encountered a similar problem. Does anyone know the reason and how to solve it? thank you. Hi @YuriSizuku, we now have a PyTorch conversion library, [AI-Edge-Torch](https://github.com/google-ai-edge/ai-edge-torch), you can find more information here: [googleblog](https://developers.googleblog.com/en/ai-edge-torch-high-performance-inference-of-pytorch-models-on-mobile-devices/).

I have actually created a simple script for converting an rnn model here:

```py
import torch
from torch import nn
import ai_edge_torch

rnn = nn.RNN(10, 20, 2)
sample_inputs = (torch.randn(5, 3, 10),)

edge_model = ai_edge_torch.convert(rnn.eval(), sample_inputs)
sample_outputs = edge_model(*sample_inputs)
print(sample_outputs)
```

example output:
```sh
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
[array([[[ 0.2431118 ,  0.06235815,  0.00344649,  0.17776804,
          0.23679167, -0.0288435 , -0.10046795, -0.15170264,
          0.01992229,  0.03517441, -0.17016807, -0.07532725,
         -0.23639274, -0.06456912,  0.15550321,  0.08035061,
          0.02570525, -0.40846297, -0.18534435,  0.16825229],
        [-0.18317065,  0.05966392, -0.20141582, -0.07385322,
         -0.28243184,  0.05996443,  0.26688445, -0.211288  ,
         -0.33300522, -0.04353373, -0.3800146 ,  0.0406212 ,
          0.05183808,  0.06664597,  0.2945734 ,  0.49857348,
         -0.21562281, -0.25770244, -0.3131145 , -0.03460141],
        [-0.16695906,  0.21162465, -0.24315475,  0.00936348,
         -0.02764254,  0.20015398,  0.44777521, -0.21858564,
          0.00373377, -0.38817146, -0.5333292 ,  0.19483805,
         -0.16324732, -0.20361441,  0.22146665, -0.22068164,
         -0.24459498, -0.09547581,  0.14915003, -0.05483112]],

       [[-0.23323143,  0.41526547,  0.00867236, -0.06482001,
         -0.13521166,  0.4930158 ,  0.56015074, -0.01654232,
          0.28613555, -0.5156335 , -0.2693312 , -0.05591698,
         -0.39816546,  0.07836445,  0.1378024 , -0.09236679,
         -0.27620402, -0.4739875 , -0.06223845,  0.45140594],
        [ 0.14702684,  0.43046153, -0.18450318,  0.42295033,
         -0.03423792,  0.35017267, -0.05320767, -0.00685967,
          0.13445464, -0.33456326, -0.30643368, -0.17181066,
          0.02008791,  0.23411715, -0.00245866, -0.10255101,
          0.3132771 ,  0.15635973, -0.06194769,  0.49516347],
        [-0.19756572,  0.26787412, -0.3043269 , -0.03941626,
          0.11208605,  0.23174919,  0.23688109,  0.08590817,
          0.21840666,  0.03197437,  0.07209112, -0.23433073,
          0.32314724, -0.05348776,  0.58448607,  0.42427984,
         -0.15630008, -0.29558602, -0.14623547,  0.1060374 ]],

       [[-0.14445083,  0.2898361 ,  0.23752378, -0.26255518,
          0.53153807,  0.49530193,  0.19309106,  0.0822446 ,
          0.6192373 , -0.2987862 , -0.07411999, -0.0056248 ,
         -0.34401622, -0.02621307,  0.5500692 , -0.01893932,
         -0.2982351 , -0.33952028, -0.13640165, -0.02855544],
        [-0.00369995,  0.17526105, -0.07810821,  0.3482869 ,
         -0.04704977, -0.12569617,  0.5545775 , -0.21356013,
          0.14047596, -0.4543471 , -0.03457044,  0.10925914,
         -0.09207486, -0.01040453, -0.0659247 , -0.33523113,
          0.08538487, -0.1200012 , -0.33902514,  0.04560279],
        [-0.10175765,  0.40730628, -0.1265934 ,  0.26016185,
         -0.12017653, -0.01349099,  0.6028484 , -0.23501587,
         -0.04607139, -0.5135092 , -0.38583383,  0.39900216,
         -0.14994566, -0.18539993, -0.15845336, -0.17449719,
         -0.24278656, -0.44319314, -0.0409166 ,  0.30520165]],

       [[-0.23232898,  0.08625392, -0.07340918,  0.06319071,
         -0.11097958,  0.02782956, -0.03228264, -0.15964286,
          0.28856406,  0.13909867,  0.38994902, -0.5045144 ,
         -0.06314449, -0.16901886,  0.34486222,  0.7810114 ,
         -0.39775494, -0.5730973 , -0.36357316,  0.14222966],
        [-0.04788137,  0.57239765, -0.42559105, -0.3851193 ,
         -0.4322731 ,  0.17473899,  0.2781501 , -0.3135546 ,
          0.16818762, -0.5378859 , -0.436202  ,  0.24547724,
         -0.22671576, -0.21490538,  0.03390764,  0.33757707,
         -0.26851228,  0.13539045,  0.12432808,  0.17681476],
        [ 0.00723328,  0.45953745, -0.06097123,  0.16176198,
          0.17545281,  0.04761023,  0.08551856, -0.39673173,
         -0.1030248 , -0.41911608, -0.36077395,  0.25994748,
          0.17877859, -0.22195749,  0.20626257,  0.03892534,
         -0.11264925,  0.41848317, -0.00793925,  0.11859634]],

       [[-0.19413333,  0.25094593,  0.07414938,  0.24743508,
         -0.33084935, -0.06709898,  0.36981508, -0.4653449 ,
         -0.11439489, -0.4342906 , -0.57224137, -0.0408266 ,
         -0.5128257 ,  0.10127501,  0.04174631,  0.45715442,
         -0.36309534, -0.59043044, -0.19902939,  0.09469209],
        [-0.02696281,  0.5366578 , -0.2641655 ,  0.40929306,
         -0.10690639,  0.4548107 ,  0.58759534, -0.4134388 ,
          0.03856685, -0.32694018, -0.37587804,  0.6371258 ,
         -0.25595975, -0.03472416,  0.03825448, -0.03601537,
         -0.29256642, -0.15788952,  0.04303175,  0.50009584],
        [-0.2043812 ,  0.20162553, -0.30228066,  0.17630152,
         -0.07913021, -0.07020605, -0.21900353,  0.02324237,
         -0.12460969,  0.08818662,  0.19243196, -0.41052923,
          0.18283717,  0.09857927,  0.13043833,  0.48166376,
          0.18589105,  0.18693772, -0.285601  ,  0.01860644]]],
      dtype=float32), array([[[ 0.03736883,  0.01305096,  0.23953459,  0.35007694,
         -0.42613977, -0.25811744, -0.7938471 , -0.29008776,
          0.25216168, -0.04332235,  0.15051644,  0.2856495 ,
          0.50434947,  0.20682862, -0.15353562, -0.44327822,
          0.14009207, -0.4573151 , -0.3230373 ,  0.30941603],
        [ 0.5185348 , -0.7085531 ,  0.7809766 ,  0.083186  ,
          0.61447036,  0.04986111, -0.04477785,  0.11479376,
         -0.47155038, -0.09569892,  0.45652747,  0.5076367 ,
          0.33670843,  0.81528795,  0.3810344 , -0.55715615,
         -0.13840713,  0.0295257 , -0.400796  ,  0.7569292 ],
        [ 0.15410309,  0.13176374,  0.537471  , -0.29153112,
         -0.37749422, -0.4663961 , -0.04389405, -0.70734435,
          0.2729918 ,  0.22016479, -0.41638312,  0.32398424,
          0.24226122, -0.14321595,  0.04044551,  0.12845491,
         -0.5569717 ,  0.49633956,  0.14523073, -0.26000744]],

       [[-0.19413333,  0.25094593,  0.07414938,  0.24743508,
         -0.33084935, -0.06709898,  0.36981508, -0.4653449 ,
         -0.11439489, -0.4342906 , -0.57224137, -0.0408266 ,
         -0.5128257 ,  0.10127501,  0.04174631,  0.45715442,
         -0.36309534, -0.59043044, -0.19902939,  0.09469209],
        [-0.02696281,  0.5366578 , -0.2641655 ,  0.40929306,
         -0.10690639,  0.4548107 ,  0.58759534, -0.4134388 ,
          0.03856685, -0.32694018, -0.37587804,  0.6371258 ,
         -0.25595975, -0.03472416,  0.03825448, -0.03601537,
         -0.29256642, -0.15788952,  0.04303175,  0.50009584],
        [-0.2043812 ,  0.20162553, -0.30228066,  0.17630152,
         -0.07913021, -0.07020605, -0.21900353,  0.02324237,
         -0.12460969,  0.08818662,  0.19243196, -0.41052923,
          0.18283717,  0.09857927,  0.13043833,  0.48166376,
          0.18589105,  0.18693772, -0.285601  ,  0.01860644]]],
      dtype=float32)]
```

If you want to, you can actually try visualizing the result in [model-explorer](https://github.com/google-ai-edge/model-explorer) as well.

Please try them out and let us know if this resolves your issue. If you still need further help, feel free to open a new issue at the respective repo.
### 1. System information

- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): windows 10
- TensorFlow installation (pip package or built from source): pip install tensorflow==2.10.1
- TensorFlow library (version, if pip package or github SHA, if built from source): 

### 2. Code

``` python
import numpy as np
import tensorflow as tf

outname = "simplernn1d"
tfpath = outname + ".tf"
tflitepath = outname + ".tflite"
x = np.zeros([1, 10, 3], dtype=np.float32)
h0 = np.zeros([1, 1, 64], dtype=np.float32)

# test model tf
model_tf = tf.saved_model.load(tfpath)
tf_sess = model_tf.signatures["serving_default"]
y_tf = tf_sess(input=x, h0=h0)['output'].numpy().item()
print(f"#### y_tf={y_tf}")

# convert to tflite
tflite_converter = tf.lite.TFLiteConverter.from_saved_model(outname + ".tf")
tflite_converter.optimizations = [tf.lite.Optimize.DEFAULT]
model_tflite = tflite_converter.convert()
with open(tflitepath, "wb") as fp: fp.write(model_tflite)

# test tf lite
tf.lite.experimental.Analyzer.analyze(model_path=tflitepath)
tflite_sess = tf.lite.Interpreter(model_path=tflitepath)
tflite_sess.allocate_tensors()
tflite_inputs = tflite_sess.get_input_details()
tflite_outputs = tflite_sess.get_output_details()
tflite_tensors = tflite_sess.get_tensor_details()
tflite_sess.set_tensor(tflite_inputs[0]['index'], h0)
tflite_sess.set_tensor(tflite_inputs[1]['index'], x)
# tensorflow/lite/kernels/reshape.cc:85 num_input_elements != num_output_elements (4288 != 64)Node number 18 (RESHAPE) failed to prepare.Node number 5 (WHILE) failed to invoke.
tflite_sess.invoke()
y_tflite = tflite_sess.get_tensor(tflite_outputs[0]['index'])
```

tf model: [simplernn1d.tf.zip](https://github.com/tensorflow/tensorflow/files/14041244/simplernn1d.tf.zip)
tflite model: [simplernn1d.zip](https://github.com/tensorflow/tensorflow/files/14041257/simplernn1d.zip)

### 3. Failure after conversion
The tf graph runs successfuly but tflite model can not invoke

```
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
  File "test_tllite.py", line 32, in <module>
    tflite_sess.invoke()
  File "D:\Software\env\miniconda\lib\site-packages\tensorflow\lite\python\interpreter.py", line 917, in invoke
    self._interpreter.Invoke()
RuntimeError: tensorflow/lite/kernels/reshape.cc:85 num_input_elements != num_output_elements (4288 != 64)Node number 18 (RESHAPE) failed to prepare.Node number 5 (WHILE) failed to invoke
```

### 4. (optional) RNN conversion support
If converting TF RNN to TFLite fused RNN ops, please prefix [RNN] in the title.

### 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.

```
2024-01-25 01:30:55.457215: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-01-25 01:30:55.710649: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1616] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 13729 MB memory:  -> device: 0, name: NVIDIA GeForce RTX 3080 Laptop GPU, pci bus id: 0000:01:00.0, compute capability: 8.6
2024-01-25 01:30:56.238163: W tensorflow/core/grappler/optimizers/loop_optimizer.cc:907] Skipping loop optimization for Merge node with control input: StatefulPartitionedCall/assert_equal_1/Assert/AssertGuard/branch_executed/_77
2024-01-25 01:30:56.679744: I tensorflow/stream_executor/cuda/cuda_blas.cc:1614] TensorFloat-32 will be used for the matrix multiplication. This will only be logged once.
#### y_tf=-0.02337179332971573
2024-01-25 01:30:56.789222: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:362] Ignored output_format.
2024-01-25 01:30:56.789452: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:365] Ignored drop_control_dependency.
2024-01-25 01:30:56.790455: I tensorflow/cc/saved_model/reader.cc:45] Reading SavedModel from: simplernn1d.tf
2024-01-25 01:30:56.791770: I tensorflow/cc/saved_model/reader.cc:89] Reading meta graph with tags { serve }
2024-01-25 01:30:56.791889: I tensorflow/cc/saved_model/reader.cc:130] Reading SavedModel debug info (if present) from: simplernn1d.tf
2024-01-25 01:30:56.796659: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:354] MLIR V1 optimization pass is not enabled
2024-01-25 01:30:56.797165: I tensorflow/cc/saved_model/loader.cc:229] Restoring SavedModel bundle.
2024-01-25 01:30:56.810718: I tensorflow/cc/saved_model/loader.cc:213] Running initialization op on SavedModel bundle at path: simplernn1d.tf
2024-01-25 01:30:56.818640: I tensorflow/cc/saved_model/loader.cc:305] SavedModel load for tags { serve }; Status: success: OK. Took 28182 microseconds.
2024-01-25 01:30:56.836125: I tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc:268] disabling MLIR crash reproducer, set env var `MLIR_CRASH_REPRODUCER_DIRECTORY` to enable.
=== simplernn1d.tflite ===

Your TFLite model has '4' subgraph(s). In the subgraph description below,
T# represents the Tensor numbers. For example, in Subgraph#0, the CALL_ONCE op takes
 as input and produces  as output.

Subgraph#0 main(T#0, T#1) -> [T#27]
  Op#0 CALL_ONCE(Subgraph#1) -> []
  Op#1 VAR_HANDLE() -> [T#14]
  Op#2 VAR_HANDLE() -> [T#15]
  Op#3 STRIDED_SLICE(T#0, T#4[0, 0, 0], T#5[1, 1, 64], T#6[1, 1, 1]) -> [T#16]
  Op#4 RESHAPE(T#1, T#2[10, 1, 3]) -> [T#17]
  Op#5 WHILE(T#9[0], T#9[0], T#7[], T#16, T#15, T#14, T#17, Cond: Subgraph#2, Body: Subgraph#3) -> [T#18, T#19, T#20, T#21, T#22, T#23, T#24]
  Op#6 RESHAPE(T#20, T#3[1, 10, 64]) -> [T#25]
  Op#7 GATHER(T#25, T#11[]) -> [T#26]
  Op#8 FULLY_CONNECTED(T#26, T#13[], T#12[]) -> [T#27]

Tensors of Subgraph#0
  T#0(serving_default_h0:0) shape:[1, 1, 64], type:FLOAT32
  T#1(serving_default_input:0) shape:[1, 10, 3], type:FLOAT32
  T#2(onnx_tf_prefix_/rnn/Transpose) shape:[3], type:INT32 RO 12 bytes, data:[10, 1, 3]
  T#3(onnx_tf_prefix_/rnn/Transpose_1) shape:[3], type:INT32 RO 12 bytes, data:[1, 10, 64]
  T#4(RNN_300dd8be/strided_slice) shape:[3], type:INT32 RO 12 bytes, data:[0, 0, 0]
  T#5(RNN_300dd8be/strided_slice1) shape:[3], type:INT32 RO 12 bytes, data:[1, 1, 64]
  T#6(RNN_300dd8be/strided_slice2) shape:[3], type:INT32 RO 12 bytes, data:[1, 1, 1]
  T#7(RNN_300dd8be/rnn/TensorArrayV2) shape:[10, 1, 64], type:FLOAT32 RO 2560 bytes, data:[]
  T#8(ExpandDims_1/dim) shape:[], type:INT32 RO 4 bytes, data:[1]
  T#9(RNN_300dd8be/rnn/time) shape:[], type:INT32 RO 4 bytes, data:[0]
  T#10(RNN_300dd8be/rnn/strided_slice) shape:[], type:INT32 RO 4 bytes, data:[10]
  T#11(Add) shape:[], type:INT64 RO 8 bytes, data:[]
  T#12(Const) shape:[1], type:FLOAT32 RO 4 bytes, data:[]
  T#13(MatMul) shape:[1, 64], type:FLOAT32 RO 256 bytes, data:[]
  T#14(rnn_bias_/rnn/rnn) shape:[], type:RESOURCE
  T#15(rnn_kernel_/rnn/rnn) shape:[], type:RESOURCE
  T#16(RNN_300dd8be/strided_slice3) shape:[1, 64], type:FLOAT32
  T#17(onnx_tf_prefix_/rnn/Transpose1) shape:[10, 1, 3], type:FLOAT32
  T#18(RNN_300dd8be/rnn/while) shape:[], type:INT32
  T#19(RNN_300dd8be/rnn/while1) shape:[], type:INT32
  T#20(RNN_300dd8be/rnn/while2) shape:[10, 1, 64], type:FLOAT32
  T#21(RNN_300dd8be/rnn/while3) shape:[1, 64], type:FLOAT32
  T#22(RNN_300dd8be/rnn/while4) shape:[], type:RESOURCE
  T#23(RNN_300dd8be/rnn/while5) shape:[], type:RESOURCE
  T#24(RNN_300dd8be/rnn/while6) shape:[10, 1, 3], type:FLOAT32
  T#25(onnx_tf_prefix_/rnn/Transpose_11) shape:[1, 10, 64], type:FLOAT32
  T#26(onnx_tf_prefix_/Gather;ExpandDims_1/dim) shape:[1, 64], type:FLOAT32
  T#27(StatefulPartitionedCall:0) shape:[1, 1], type:FLOAT32

Subgraph#1 NoOp() -> []
  Op#0 VAR_HANDLE() -> [T#1_2]
  Op#1 ASSIGN_VARIABLE(T#1_2, T#1_1[]) -> []
  Op#2 VAR_HANDLE() -> [T#1_3]
  Op#3 ASSIGN_VARIABLE(T#1_3, T#1_0[]) -> []

Tensors of Subgraph#1
  T#1_0(arith.constant) shape:[64], type:FLOAT32 RO 256 bytes, data:[]
  T#1_1(arith.constant1) shape:[1, 64], type:FLOAT32 RO 256 bytes, data:[]
  T#1_2(rnn_kernel_/rnn/rnn1) shape:[], type:RESOURCE
  T#1_3(rnn_bias_/rnn/rnn1) shape:[], type:RESOURCE

Subgraph#2 RNN_300dd8be/rnn/while_cond(T#2_0, T#2_1, T#2_2, T#2_3, T#2_4, T#2_5, T#2_6) -> [T#2_10]
  Op#0 LESS(T#2_1, T#2_7[10]) -> [T#2_8]
  Op#1 LESS(T#2_0, T#2_7[10]) -> [T#2_9]
  Op#2 LOGICAL_AND(T#2_9, T#2_8) -> [T#2_10]

Tensors of Subgraph#2
  T#2_0(arg0) shape:[], type:INT32
  T#2_1(arg1) shape:[], type:INT32
  T#2_2(arg2) shape:[10, 1, 64], type:FLOAT32
  T#2_3(arg3) shape:[1, 64], type:FLOAT32
  T#2_4(arg4) shape:[], type:RESOURCE
  T#2_5(arg5) shape:[], type:RESOURCE
  T#2_6(arg6) shape:[10, 1, 3], type:FLOAT32
  T#2_7(RNN_300dd8be/rnn/strided_slice1) shape:[], type:INT32 RO 4 bytes, data:[10]
  T#2_8(RNN_300dd8be/rnn/while/Less) shape:[], type:BOOL
  T#2_9(RNN_300dd8be/rnn/while/Less_1) shape:[], type:BOOL
  T#2_10(RNN_300dd8be/rnn/while/LogicalAnd) shape:[], type:BOOL

Subgraph#3 RNN_300dd8be/rnn/while_body(T#3_0, T#3_1, T#3_2, T#3_3, T#3_4, T#3_5, T#3_6) -> [T#3_18, T#3_17, T#3_34, T#3_26, T#3_4, T#3_5, T#3_6]
  Op#0 ADD(T#3_1, T#3_9[1]) -> [T#3_17]
  Op#1 ADD(T#3_0, T#3_9[1]) -> [T#3_18]
  Op#2 GATHER(T#3_6, T#3_1) -> [T#3_19]
  Op#3 CONCATENATION(T#3_19, T#3_3) -> [T#3_20]
  Op#4 ASSIGN_VARIABLE(T#3_4, T#3_12[]) -> []
  Op#5 READ_VARIABLE(T#3_4) -> [T#3_21]
  Op#6 TRANSPOSE(T#3_21, T#3_16[1, 0]) -> [T#3_22]
  Op#7 FULLY_CONNECTED(T#3_20, T#3_22, T#-1) -> [T#3_23]
  Op#8 ASSIGN_VARIABLE(T#3_5, T#3_11[]) -> []
  Op#9 READ_VARIABLE(T#3_5) -> [T#3_24]
  Op#10 ADD(T#3_23, T#3_24) -> [T#3_25]
  Op#11 TANH(T#3_25) -> [T#3_26]
  Op#12 RESHAPE(T#3_1, T#3_10[1]) -> [T#3_27]
  Op#13 CONCATENATION(T#3_27, T#3_14[-1, -1]) -> [T#3_28]
  Op#14 SLICE(T#3_2, T#3_8[0, 0, 0], T#3_28) -> [T#3_29]
  Op#15 RESHAPE(T#3_17, T#3_10[1]) -> [T#3_30]
  Op#16 CONCATENATION(T#3_30, T#3_15[0, 0]) -> [T#3_31]
  Op#17 SLICE(T#3_2, T#3_31, T#3_13[-1, -1, -1]) -> [T#3_32]
  Op#18 RESHAPE(T#3_26, T#3_7[1, 1, 64]) -> [T#3_33]
  Op#19 CONCATENATION(T#3_29, T#3_33, T#3_32) -> [T#3_34]

Tensors of Subgraph#3
  T#3_0(arg0) shape:[], type:INT32
  T#3_1(arg1) shape:[], type:INT32
  T#3_2(arg2) shape:[10, 1, 64], type:FLOAT32
  T#3_3(arg3) shape:[1, 64], type:FLOAT32
  T#3_4(arg4) shape:[], type:RESOURCE
  T#3_5(arg5) shape:[], type:RESOURCE
  T#3_6(arg6) shape:[10, 1, 3], type:FLOAT32
  T#3_7(RNN_300dd8be/strided_slice4) shape:[3], type:INT32 RO 12 bytes, data:[1, 1, 64]
  T#3_8(RNN_300dd8be/strided_slice5) shape:[3], type:INT32 RO 12 bytes, data:[0, 0, 0]
  T#3_9(ExpandDims_1/dim1) shape:[], type:INT32 RO 4 bytes, data:[1]
  T#3_10(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem) shape:[1], type:INT32 RO 4 bytes, data:[1]
  T#3_11(Add1) shape:[64], type:FLOAT32 RO 256 bytes, data:[]
  T#3_12(concat) shape:[67, 64], type:FLOAT32 RO 17152 bytes, data:[]
  T#3_13(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem1) shape:[3], type:INT32 RO 12 bytes, data:[-1, -1, -1]
  T#3_14(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem2) shape:[2], type:INT32 RO 8 bytes, data:[-1, -1]
  T#3_15(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem3) shape:[2], type:INT32 RO 8 bytes, data:[0, 0]
  T#3_16(RNN_300dd8be/rnn/while/rnn/multi_rnn_cell/cell_0/basic_rnn_cell/MatMul1) shape:[2], type:INT32 RO 8 bytes, data:[1, 0]
  T#3_17(RNN_300dd8be/rnn/while/add) shape:[], type:INT32
  T#3_18(RNN_300dd8be/rnn/while/add_1) shape:[], type:INT32
  T#3_19(RNN_300dd8be/rnn/while/TensorArrayV2Read/TensorListGetItem;RNN_300dd8be/rnn/time) shape:[1, 3], type:FLOAT32
  T#3_20(RNN_300dd8be/rnn/while/rnn/multi_rnn_cell/cell_0/basic_rnn_cell/concat) shape:[1, 67], type:FLOAT32
  T#3_21(RNN_300dd8be/rnn/while/rnn/multi_rnn_cell/cell_0/basic_rnn_cell/MatMul/ReadVariableOp) shape_signature:[-1, 64], type:FLOAT32
  T#3_22(RNN_300dd8be/rnn/while/rnn/multi_rnn_cell/cell_0/basic_rnn_cell/MatMul2) shape_signature:[64, -1], type:FLOAT32
  T#3_23(RNN_300dd8be/rnn/while/rnn/multi_rnn_cell/cell_0/basic_rnn_cell/MatMul3) shape:[1, 64], type:FLOAT32
  T#3_24(RNN_300dd8be/rnn/while/rnn/multi_rnn_cell/cell_0/basic_rnn_cell/BiasAdd/ReadVariableOp) shape:[64], type:FLOAT32
  T#3_25(RNN_300dd8be/rnn/while/rnn/multi_rnn_cell/cell_0/basic_rnn_cell/BiasAdd) shape:[1, 64], type:FLOAT32
  T#3_26(RNN_300dd8be/rnn/while/rnn/multi_rnn_cell/cell_0/basic_rnn_cell/Tanh) shape:[1, 64], type:FLOAT32
  T#3_27(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem4) shape:[1], type:INT32
  T#3_28(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem5) shape:[3], type:INT32
  T#3_29(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem6) shape_signature:[-1, -1, -1], type:FLOAT32
  T#3_30(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem7) shape:[1], type:INT32
  T#3_31(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem8) shape:[3], type:INT32
  T#3_32(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem9) shape_signature:[-1, -1, -1], type:FLOAT32
  T#3_33(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem10) shape:[1, 1, 64], type:FLOAT32
  T#3_34(RNN_300dd8be/rnn/while/TensorArrayV2Write/TensorListSetItem11) shape:[10, 1, 64], type:FLOAT32

---------------------------------------------------------------
Your TFLite model has '1' signature_def(s).

Signature#0 key: 'serving_default'
- Subgraph: Subgraph#0
- Inputs:
    'h0' : T#0
    'input' : T#1
- Outputs:
    'output' : T#27

---------------------------------------------------------------
              Model size:      30896 bytes
    Non-data buffer size:      10160 bytes (32.88 %)
  Total data buffer size:      20736 bytes (67.12 %)
          - Subgraph#0  :       2900 bytes (09.39 %)
          - Subgraph#1  :        512 bytes (01.66 %)
          - Subgraph#2  :          4 bytes (00.01 %)
          - Subgraph#3  :      17476 bytes (56.56 %)
    (Zero value buffers):       2852 bytes (09.23 %)

* Buffers of TFLite model are mostly used for constant tensors.
  And zero value buffers are buffers filled with zeros.
  Non-data buffers area are used to store operators, subgraphs and etc.
  You can find more details from https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/schema/schema.fbs

INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
  File "test_tllite.py", line 32, in <module>
    tflite_sess.invoke()
  File "D:\Software\env\miniconda\lib\site-packages\tensorflow\lite\python\interpreter.py", line 917, in invoke
    self._interpreter.Invoke()
RuntimeError: tensorflow/lite/kernels/reshape.cc:85 num_input_elements != num_output_elements (4288 != 64)Node number 18 (RESHAPE) failed to prepare.Node number 5 (WHILE) failed to invoke.
```
