From e3b4d9857897561d64cde6a6ae217f1ba2dad6fd Mon Sep 17 00:00:00 2001 From: LielinJiang Date: Thu, 16 Apr 2020 03:46:33 +0000 Subject: [PATCH] add image cls scripts --- .../scripts/mobilenet_v1_x1.0.sh | 13 +++++++++++++ .../scripts/mobilenet_v2_x1.0.sh | 12 ++++++++++++ examples/image_classification/scripts/resnet101.sh | 10 ++++++++++ examples/image_classification/scripts/resnet152.sh | 10 ++++++++++ examples/image_classification/scripts/resnet18.sh | 11 +++++++++++ examples/image_classification/scripts/resnet34.sh | 11 +++++++++++ examples/image_classification/scripts/resnet50.sh | 10 ++++++++++ examples/image_classification/scripts/vgg16.sh | 11 +++++++++++ 8 files changed, 88 insertions(+) create mode 100644 examples/image_classification/scripts/mobilenet_v1_x1.0.sh create mode 100644 examples/image_classification/scripts/mobilenet_v2_x1.0.sh create mode 100644 examples/image_classification/scripts/resnet101.sh create mode 100644 examples/image_classification/scripts/resnet152.sh create mode 100644 examples/image_classification/scripts/resnet18.sh create mode 100644 examples/image_classification/scripts/resnet34.sh create mode 100644 examples/image_classification/scripts/resnet50.sh create mode 100644 examples/image_classification/scripts/vgg16.sh diff --git a/examples/image_classification/scripts/mobilenet_v1_x1.0.sh b/examples/image_classification/scripts/mobilenet_v1_x1.0.sh new file mode 100644 index 0000000..16734e6 --- /dev/null +++ b/examples/image_classification/scripts/mobilenet_v1_x1.0.sh @@ -0,0 +1,13 @@ +export CUDA_VISIBLE_DEVICES=0,1,2,3 + +# 默认imagenet数据存储在data/ILSVRC2012/下,去除-d便使用静态图模式运行 +python -m paddle.distributed.launch main.py \ + --arch mobilenet_v1 \ + --epoch 120 \ + --batch-size 64 \ + --learning-rate 0.1 \ + --lr-scheduler piecewise \ + --milestones 30 60 90 \ + --weight-decay 3e-5 \ + -d \ + data/ILSVRC2012/ \ No newline at end of file diff --git a/examples/image_classification/scripts/mobilenet_v2_x1.0.sh b/examples/image_classification/scripts/mobilenet_v2_x1.0.sh new file mode 100644 index 0000000..2616d7e --- /dev/null +++ b/examples/image_classification/scripts/mobilenet_v2_x1.0.sh @@ -0,0 +1,12 @@ +export CUDA_VISIBLE_DEVICES=0,1,2,3 + +# 默认imagenet数据存储在data/ILSVRC2012/下,去除-d便使用静态图模式运行 +python -m paddle.distributed.launch main.py \ + --arch mobilenet_v2 \ + --epoch 240 \ + --batch-size 64 \ + --learning-rate 0.1 \ + --lr-scheduler cosine \ + --weight-decay 4e-5 \ + -d \ + data/ILSVRC2012/ \ No newline at end of file diff --git a/examples/image_classification/scripts/resnet101.sh b/examples/image_classification/scripts/resnet101.sh new file mode 100644 index 0000000..34844ca --- /dev/null +++ b/examples/image_classification/scripts/resnet101.sh @@ -0,0 +1,10 @@ +export CUDA_VISIBLE_DEVICES=0,1,2,3 + +# 默认imagenet数据存储在data/ILSVRC2012/下,去除-d便使用静态图模式运行 +python -m paddle.distributed.launch main.py \ + --arch resnet101 \ + --epoch 90 \ + --batch-size 64 \ + --learning-rate 0.1 \ + -d \ + data/ILSVRC2012/ \ No newline at end of file diff --git a/examples/image_classification/scripts/resnet152.sh b/examples/image_classification/scripts/resnet152.sh new file mode 100644 index 0000000..2654163 --- /dev/null +++ b/examples/image_classification/scripts/resnet152.sh @@ -0,0 +1,10 @@ +export CUDA_VISIBLE_DEVICES=0,1,2,3 + +# 默认imagenet数据存储在data/ILSVRC2012/下,去除-d便使用静态图模式运行 +python -m paddle.distributed.launch main.py \ + --arch resnet152 \ + --epoch 90 \ + --batch-size 64 \ + --learning-rate 0.1 \ + -d \ + data/ILSVRC2012/ \ No newline at end of file diff --git a/examples/image_classification/scripts/resnet18.sh b/examples/image_classification/scripts/resnet18.sh new file mode 100644 index 0000000..f1f20e5 --- /dev/null +++ b/examples/image_classification/scripts/resnet18.sh @@ -0,0 +1,11 @@ +export CUDA_VISIBLE_DEVICES=0,1,2,3 + +# 默认imagenet数据存储在data/ILSVRC2012/下,去除-d便使用静态图模式运行 +python -m paddle.distributed.launch main.py \ + --arch resnet18 \ + --epoch 120 \ + --batch-size 64 \ + --learning-rate 0.1 \ + --lr-scheduler cosine \ + -d \ + data/ILSVRC2012/ \ No newline at end of file diff --git a/examples/image_classification/scripts/resnet34.sh b/examples/image_classification/scripts/resnet34.sh new file mode 100644 index 0000000..a4a3661 --- /dev/null +++ b/examples/image_classification/scripts/resnet34.sh @@ -0,0 +1,11 @@ +export CUDA_VISIBLE_DEVICES=0,1,2,3 + +# 默认imagenet数据存储在data/ILSVRC2012/下,去除-d便使用静态图模式运行 +python -m paddle.distributed.launch main.py \ + --arch resnet34 \ + --epoch 120 \ + --batch-size 64 \ + --learning-rate 0.1 \ + --lr-scheduler cosine \ + -d \ + data/ILSVRC2012/ \ No newline at end of file diff --git a/examples/image_classification/scripts/resnet50.sh b/examples/image_classification/scripts/resnet50.sh new file mode 100644 index 0000000..50a0e73 --- /dev/null +++ b/examples/image_classification/scripts/resnet50.sh @@ -0,0 +1,10 @@ +export CUDA_VISIBLE_DEVICES=0,1,2,3 + +# 默认imagenet数据存储在data/ILSVRC2012/下,去除-d便使用静态图模式运行 +python -m paddle.distributed.launch main.py \ + --arch resnet50 \ + --epoch 90 \ + --batch-size 64 \ + --learning-rate 0.1 \ + -d \ + data/ILSVRC2012/ \ No newline at end of file diff --git a/examples/image_classification/scripts/vgg16.sh b/examples/image_classification/scripts/vgg16.sh new file mode 100644 index 0000000..7372ce3 --- /dev/null +++ b/examples/image_classification/scripts/vgg16.sh @@ -0,0 +1,11 @@ +export CUDA_VISIBLE_DEVICES=0,1,2,3 + +# 默认imagenet数据存储在data/ILSVRC2012/下,去除-d便使用静态图模式运行 +python -m paddle.distributed.launch main.py \ + --arch vgg16 \ + --epoch 90 \ + --batch-size 64 \ + --learning-rate 0.01 \ + --lr-scheduler cosine \ + -d \ + data/ILSVRC2012/ \ No newline at end of file -- GitLab