Skip to content

Commit 971c727

Browse files
committed
[ResNet50/Paddle] Update NGC ckpt info
1 parent e9f7444 commit 971c727

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

  • PaddlePaddle/Classification/RN50v1.5

PaddlePaddle/Classification/RN50v1.5/README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -330,34 +330,41 @@ python -m paddle.distributed.launch --gpus=0,1,2,3,4,5,6,7 train.py \
330330
Note that for initializing training with checkpoints or pretrained parameters, refer to [Training process](#training-process) for more details.
331331

332332
### 6. Start validation/evaluation.
333-
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`.
333+
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`.
334+
335+
You can download pretrained weights from NGC:
336+
```shell
337+
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
338+
unzip -d <path_to_downloaded_ckpt> resnet_50_paddle_ckpt_22.05.0_amp.zip
339+
```
340+
This checkpoint is well pretrained on the ImageNet dataset with AMP mode. It achieves 77.11% top 1 accuracy on the test dataset.
334341

335342
Example:
336343
* TF32
337344
```bash
338345
# For single GPU evaluation
339346
python -m paddle.distributed.launch --gpus=0 train.py \
340-
--from-pretrained-params <path_to_pretrained_params> \
347+
--from-pretrained-params <path_to_downloaded_ckpt> \
341348
--run-scope eval_only
342349

343350
# For 8 GPUs evaluation
344351
python -m paddle.distributed.launch --gpus=0,1,2,3,4,5,6,7 train.py \
345-
--from-pretrained-params <path_to_pretrained_params> \
352+
--from-pretrained-params <path_to_downloaded_ckpt> \
346353
--run-scope eval_only
347354
```
348355

349356
* AMP
350357
```bash
351358
# For single GPU evaluation
352359
python -m paddle.distributed.launch --gpus=0 train.py \
353-
--from-pretrained-params <path_to_pretrained_params> \
360+
--from-pretrained-params <path_to_downloaded_ckpt> \
354361
--run-scope eval_only \
355362
--amp \
356363
--data-layout NHWC
357364

358365
# For 8 GPUs evaluation
359366
python -m paddle.distributed.launch --gpus=0,1,2,3,4,5,6,7 train.py \
360-
--from-pretrained-params <path_to_pretrained_params> \
367+
--from-pretrained-params <path_to_downloaded_ckpt> \
361368
--run-scope eval_only \
362369
--amp \
363370
--data-layout NHWC
@@ -611,10 +618,6 @@ Metrics gathered through both training and evaluation:
611618
- `train.lr` - learning rate
612619

613620

614-
### Checkpoints
615-
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).
616-
617-
618621
### Automatic SParsity training process:
619622
To enable automatic sparsity training workflow, turn on `--amp` and `--prune-mode` when training launches. Refer to [Command-line options](#command-line-options)
620623

0 commit comments

Comments
 (0)