瀏覽代碼

[ResNet50/Paddle] Update NGC ckpt info

Shijie Wang 3 年之前
父節點
當前提交
971c727aac
共有 1 個文件被更改,包括 12 次插入9 次删除
  1. 12 9
      PaddlePaddle/Classification/RN50v1.5/README.md

+ 12 - 9
PaddlePaddle/Classification/RN50v1.5/README.md

@@ -330,19 +330,26 @@ python -m paddle.distributed.launch --gpus=0,1,2,3,4,5,6,7 train.py \
 Note that for initializing training with checkpoints or pretrained parameters, refer to [Training process](#training-process) for more details.
 
 ### 6. Start validation/evaluation.
-To evaluate the validation dataset located in `/imagenet/val`, you need to specify the pretrained parameters by `--from-pretrained-params` and set `eval_only` to `--run-scope`.
+To evaluate the validation dataset located in `/imagenet/val`, you need to specify the pretrained weights by `--from-pretrained-params` and set `eval_only` to `--run-scope`.
+
+You can download pretrained weights from NGC:
+```shell
+wget --content-disposition https://api.ngc.nvidia.com/v2/models/nvidia/dle/resnet_50_paddle_ckpt/versions/22.05.0_amp/zip -O resnet_50_paddle_ckpt_22.05.0_amp.zip
+unzip -d <path_to_downloaded_ckpt> resnet_50_paddle_ckpt_22.05.0_amp.zip
+```
+This checkpoint is well pretrained on the ImageNet dataset with AMP mode. It achieves 77.11% top 1 accuracy on the test dataset.
 
 Example:
 * TF32
 ```bash
 # For single GPU evaluation
 python -m paddle.distributed.launch --gpus=0 train.py \
-  --from-pretrained-params <path_to_pretrained_params> \
+  --from-pretrained-params <path_to_downloaded_ckpt> \
   --run-scope eval_only
 
 # For 8 GPUs evaluation
 python -m paddle.distributed.launch --gpus=0,1,2,3,4,5,6,7 train.py \
-  --from-pretrained-params <path_to_pretrained_params> \
+  --from-pretrained-params <path_to_downloaded_ckpt> \
   --run-scope eval_only
 ```
 
@@ -350,14 +357,14 @@ python -m paddle.distributed.launch --gpus=0,1,2,3,4,5,6,7 train.py \
 ```bash
 # For single GPU evaluation
 python -m paddle.distributed.launch --gpus=0 train.py \
-  --from-pretrained-params <path_to_pretrained_params> \
+  --from-pretrained-params <path_to_downloaded_ckpt> \
   --run-scope eval_only \
   --amp \
   --data-layout NHWC
 
 # For 8 GPUs evaluation
 python -m paddle.distributed.launch --gpus=0,1,2,3,4,5,6,7 train.py \
-  --from-pretrained-params <path_to_pretrained_params> \
+  --from-pretrained-params <path_to_downloaded_ckpt> \
   --run-scope eval_only \
   --amp \
   --data-layout NHWC
@@ -611,10 +618,6 @@ Metrics gathered through both training and evaluation:
  - `train.lr` - learning rate
 
 
-### Checkpoints
-We offered a checkpoint which is well pretrained on the ImageNet dataset with AMP mode. It achieves 77.11% top 1 accuracy on the test dataset. You can find out that checkpoint from [ResNet50 checkpoints (PaddlePaddle, AMP, ImageNet)](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/dle/models/resnet_50_paddle_ckpt), and resume training via the instructions in [Training process](#training-process).
-
-
 ### Automatic SParsity training process:
 To enable automatic sparsity training workflow, turn on `--amp` and `--prune-mode` when training launches. Refer to [Command-line options](#command-line-options)