Question: I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset
In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work.

I've also found a file in tensorflow/models/object\_detection/ the file `eval.py` which seems to run the evaluation but I don't entirely understand what these args are:

```
 ./eval \
        --logtostderr \
        --checkpoint_dir=path/to/checkpoint_dir \
        --eval_dir=path/to/eval_dir \
        --pipeline_config_path=pipeline_config.pbtxt

```

Suppose I have a model checkpoint (3 ckpt files meta, index and data) what should I do with them?

Answer: 
From what i see is that you are trying to generate a json object, this is not the way to do that.

```
$data = [];
while (($t = mysql_fetch_array($asd))) {
    $data[$t['a']] = $t['b'];
}

echo json_decode($data);

```

This will output a json string in the format you are trying to generate.

---

Sidenote 1:

The reason your rtrim in your code is not working is because you rtrim every line in the while loop, not the last line. But since you use `$rest =` you are also overwriting the value of `$rest` in every iteration.

---

Sidenote 2:

What @jeroen is saying in the comments, **do not** use `mysql_fetch_array`, these methods have been deprecated for some time. Look for PDO, mysqli or use a php framework with a proper ORM.
You have to do on single string, but right now you are doing it on every string instance in while loop,

```
$str = '';
while($t= mysql_fetch_array($asd)){
   $str .= '
   "'.$t['a'].'": "'.$t['b'].'",';

}

$str = rtrim($str,",");

```

Give it a try, this will help.