Skip to content

Commit 7183d49

Browse files
committed
resolve comments
1 parent 03f7bd3 commit 7183d49

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

docs/en/tutorials/how_to_evaluate_a_model.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ${MODEL_CFG} \
2222
--device ${DEVICE} \
2323
[--cfg-options ${CFG_OPTIONS}] \
2424
[--metric-options ${METRIC_OPTIONS}]
25+
[--log2file work_dirs/output.txt]
2526
```
2627

2728
## Description of all arguments
@@ -39,6 +40,7 @@ ${MODEL_CFG} \
3940
* `--cfg-options`: Extra or overridden settings that will be merged into the current deploy config.
4041
* `--metric-options`: Custom options for evaluation. The key-value pair in xxx=yyy
4142
format will be kwargs for dataset.evaluate() function.
43+
* `--log2file`: log evaluation results (and speed) to file.
4244

4345
\* Other arguments in `tools/test.py` are used for speed test. They have no concern with evaluation.
4446

docs/en/tutorials/how_to_measure_performance_of_models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ ${MODEL_CFG} \
2424
* `deploy_cfg`: The config for deployment.
2525
* `model_cfg`: The config of the model in OpenMMLab codebases.
2626
* `--model`: The backend model files. For example, if we convert a model to ncnn, we need to pass a ".param" file and a ".bin" file. If we convert a model to TensorRT, we need to pass the model file with ".engine" suffix.
27+
* `--log2file`: log evaluation results and speed to file.
2728
* `--speed-test`: Whether to activate speed test.
2829
* `--warmup`: warmup before counting inference elapse, require setting speed-test first.
2930
* `--log-interval`: The interval between each log, require setting speed-test first.
30-
* `--log2file`: Log speed test result in file format, need speed-test first.
3131

3232
\* Other arguments in `tools/test.py` are used for performance test. They have no concern with speed test.
3333

tools/test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ def parse_args():
5454
action=DictAction,
5555
help='custom options for evaluation, the key-value pair in xxx=yyy '
5656
'format will be kwargs for dataset.evaluate() function')
57+
parser.add_argument(
58+
'--log2file',
59+
type=str,
60+
help='log evaluation results and speed to file',
61+
default=None)
5762
parser.add_argument(
5863
'--speed-test', action='store_true', help='activate speed test')
5964
parser.add_argument(
@@ -68,11 +73,6 @@ def parse_args():
6873
help='the interval between each log, require setting '
6974
'speed-test first',
7075
default=100)
71-
parser.add_argument(
72-
'--log2file',
73-
type=str,
74-
help='log evaluation results and speed to file',
75-
default=None)
7676

7777
args = parser.parse_args()
7878
return args

0 commit comments

Comments
 (0)