Question: I have an object with some values as arrays.

```
let paramObj = {
    name: 'title',
    properties: [01, 02, 03],
    rooms: [01],
    city: 'cityname'
}

```

I want to convert it to url parameters like this

```
http://localhost:8080/endpoint?name=title&properties=01&properties=02&properties=03&rooms=01&city=cityName

```

I have some thing which is working fine for normal strings but I want to check if the object key has array than convert it to multiple parameters. here is my code

```
 const qs = Object.keys(paramObj)
.map(key => `${key}=${paramObj[key]}`)
.join('&');

```

Answer: 
I see 2 points where you should pay attention to:

1. > 
> (tensor<1x?x?x3x!tf.quint8>) -> tensor<1x?x?x3xui8>
> 
> 
>

Looks like your model has dynamic shape, and tflite [does not work well](https://github.com/tensorflow/tensorflow/issues/24607) with them. First of all convert your model from saved\_model to tflite with fixed input. See good way [here](https://stackoverflow.com/questions/55701663/input-images-with-dynamic-dimensions-in-tensorflow-lite) e.g.:

```
tflite_convert \
  --saved_model_dir="/tmp/test_saved_model2" \
  --output_file='model.tflite' \
  --input_shapes=1,256,256,3 \     # <-- here, you set an
                                  #     arbitrary valid shape
  --input_arrays='input' \         
  --output_arrays='Softmax'

```

Another way is to make your saved\_model with fixed input-output shape so you do not need to specify it during saved\_model->lite conversion. And this is the [only](https://github.com/tensorflow/tensorflow/issues/30180#issuecomment-505959220) option for TF2

2. > 
> converter.optimizations = [tf.lite.Optimize.DEFAULT]
> 
> 
>

During debugging process try to avoid any kind of optimizations so you will have less places to search for your bug. This is general idea.
I faced the same issue before, and now can train tflite model with following 3 steps:

1. training the data

!python /content/models/research/object\_detection/model\_main\_tf2.py   

--pipeline\_config\_path={pipeline\_config\_path}   

--model\_dir={model\_dir}   

--alsologtostderr   

--num\_train\_steps={num\_steps}   

--sample\_1\_of\_n\_eval\_examples=1   

--num\_eval\_steps={num\_eval\_steps}
2. export tflite 2 graph:

!python models/research/object\_detection/export\_tflite\_graph\_tf2.py   

--pipeline\_config\_path={pipeline\_config\_path}   

--trained\_checkpoint\_dir={model\_dir} --output\_directory=tflite\_exported
3. convert .pb to tflite

!tflite\_convert --output\_file 'model.tflite' --saved\_model\_dir 'tflite\_exported/saved\_model'