diff --git a/docs/en/whl_en.md b/docs/en/whl_en.md index a47134e5f1397e6c03181b73ff11eeace28726ab..79f7325655c99ca549d9f80cb768ddd95b898018 100644 --- a/docs/en/whl_en.md +++ b/docs/en/whl_en.md @@ -75,9 +75,15 @@ paddleclas --model_name=ResNet50 --top_k=5 --image_file='docs/images/whl/demo.jp **Note**: If you want to use `Transformer series models`, such as `DeiT_***_384`, `ViT_***_384`, etc., please pay attention to the input size of model, and need to set `resize_short=384`, `resize=384` when building a `PaddleClas` object. The following is a demo. -```python -clas = PaddleClas(model_name='ViT_base_patch16_384', top_k=5, resize_short=384, resize=384) -``` +* Bash: + ```bash + paddleclas --model_name=ViT_base_patch16_384 --image_file='docs/images/whl/demo.jpg' --resize_short=384 --resize=384 + ``` + +* Python: + ```python + clas = PaddleClas(model_name='ViT_base_patch16_384', top_k=5, resize_short=384, resize=384) + ``` ### 3. Different Usages of Codes diff --git a/docs/zh_CN/whl.md b/docs/zh_CN/whl.md index f0e115ad2d3af2e1d8df88202cfba03bb2946bd5..870c7109f533ddd60d0eb5c10fa32994f371ad04 100644 --- a/docs/zh_CN/whl.md +++ b/docs/zh_CN/whl.md @@ -72,11 +72,17 @@ paddleclas --model_name=ResNet50 --top_k=5 --image_file='docs/images/whl/demo.jp * pre_label_image(bool): 是否需要进行预标注。 * pre_label_out_idr(str): 进行预标注后,输出结果的文件路径,默认为None。 -**注意**: 如果使用`Transformer`系列模型,如`DeiT_***_384`, `ViT_***_384`等,请注意模型的输入数据尺寸,需要设置参数`resize_short=384`, `resize=384`,如下所示。 +**注意**: 如果使用`Transformer`系列模型,如`DeiT_***_384`, `ViT_***_384`等,请注意模型的输入数据尺寸,需要设置参数`resize_short=384`, `resize=384`,如下所示: -``` -clas = PaddleClas(model_name='ViT_base_patch16_384', top_k=5, resize_short=384, resize=384) -``` +* 在命令行中使用: + ```bash + paddleclas --model_name=ViT_base_patch16_384 --image_file='docs/images/whl/demo.jpg' --resize_short=384 --resize=384 + ``` + +* 在python代码中: + ```python + clas = PaddleClas(model_name='ViT_base_patch16_384', top_k=5, resize_short=384, resize=384) + ``` ### 3. 代码使用方法