ResNet Training in PaddlePaddle

This simple demo showcases ResNet50 training on ImageNet.

Run it with the commands below:

python -m paddle.distributed.launch --selected_gpus 0,1,2,3,4,5,6,7 -b 128 -j 4 [imagenet-folder with train and val folders]


To train the model, run docs/examples/use_cases/paddle/resnet50/ with the desired ResNet depth and the path to the ImageNet dataset:

python -m paddle.distributed.launch --selected_gpus 0,1,2,3,4,5,6,7 -d 50 [imagenet-folder with train and val folders]

The training schedule in He et al. 2015 was used where learning rate starts at 0.1 and decays by a factor of 10 every 30 epochs.


usage: [-h] [-d N] [-j N] [-b N] [--lr LR] [--momentum M]
                [--weight-decay W] [--print-freq N]

Paddle ImageNet Training

positional arguments:
  DIR                   path to dataset (should have subdirectories named
                        "train" and "val"

optional arguments:
  -h, --help            show this help message and exit
  -d N, --depth N       number of layers (default: 50)
  -j N, --num_threads N
                        number of threads (default: 4)
  -b N, --batch-size N  mini-batch size (default: 256)
  --lr LR, --learning-rate LR
                        initial learning rate
  --momentum M          momentum
  --weight-decay W, --wd W
                        weight decay (default: 1e-4)
  --print-freq N, -p N  print frequency (default: 10)