From 4e4074f257fcac2d24efe8c9a29285f454777536 Mon Sep 17 00:00:00 2001 From: y30062407 Date: Fri, 30 Aug 2024 12:49:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0resnet=2064p=E5=8F=8A128?= =?UTF-8?q?p=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...snet50_imagenet2012_Boost_config_128p.yaml | 114 ++++++++++++++++++ ...esnet50_imagenet2012_Boost_config_64p.yaml | 114 ++++++++++++++++++ 2 files changed, 228 insertions(+) create mode 100644 benchmark/ascend/resnet/config/resnet50_imagenet2012_Boost_config_128p.yaml create mode 100644 benchmark/ascend/resnet/config/resnet50_imagenet2012_Boost_config_64p.yaml diff --git a/benchmark/ascend/resnet/config/resnet50_imagenet2012_Boost_config_128p.yaml b/benchmark/ascend/resnet/config/resnet50_imagenet2012_Boost_config_128p.yaml new file mode 100644 index 000000000..2593e5696 --- /dev/null +++ b/benchmark/ascend/resnet/config/resnet50_imagenet2012_Boost_config_128p.yaml @@ -0,0 +1,114 @@ +# Builtin Configurations(DO NOT CHANGE THESE CONFIGURATIONS unless you know exactly what you are doing) +enable_modelarts: False +# Url for modelarts +data_url: "" +train_url: "" +checkpoint_url: "" +# Path for local +run_distribute: True +enable_profiling: False +data_path: "/data/resnet_tc/Imagenet2012/train" +output_dir: "../outputs" +load_path: "/cache/checkpoint_path/" +device_target: "Ascend" +checkpoint_path: "./checkpoint/" +checkpoint_file_path: "" + +# ============================================================================== +# Training options +optimizer: "LARS" +infer_label: "" +class_num: 1001 +batch_size: 96 +eval_batch_size: 125 +loss_scale: 1024 +momentum: 0.9 +weight_decay: 5.0e-05 +epoch_size: 49 +start_epoch: 0 +resume_ckpt: "" +save_checkpoint: False +save_checkpoint_epochs: 5 +keep_checkpoint_max: 10 +warmup_epochs: 9 +lr_decay_mode: "poly" +use_label_smooth: True +label_smooth_factor: 0.1 +lr_init: 0 +lr_max: 18.5 +lr_end: 0.0001 +lars_epsilon: 0.0 +lars_coefficient: 0.001 + +net_name: "resnet50" +dataset: "imagenet2012" +device_num: 128 +pre_trained: "" +run_eval: True +eval_dataset_path: "/data/resnet_tc/Imagenet2012/val" +parameter_server: False +filter_weight: False +save_best_ckpt: False +eval_start_epoch: 4 +eval_interval: 4 +enable_cache: False +cache_session_id: "" +mode_name: "GRAPH" +boost_mode: "O1" +conv_init: "TruncatedNormal" +dense_init: "TruncatedNormal" +all_reduce_fusion_config: + - 85 + - 160 +train_image_size: 192 +eval_image_size: 224 +max_device_memory: "30GB" + +# Export options +device_id: 0 +width: 224 +height: 224 +file_name: "resnet50" +file_format: "MINDIR" +ckpt_file: "" +network_dataset: "resnet50_imagenet2012" + +# Retrain options +save_graphs: False +save_graphs_path: "./graphs" +has_trained_epoch: 0 +has_trained_step: 0 + +# postprocess resnet inference +result_path: '' +label_path: '' + +# prediction +img_path: '' + +# lite inference +enable_predict: False +enable_predict_lite_backend: False +enable_predict_lite_mindir: False + +# lite mindir inference +mindir_path: 'net.mindir' + + +# # Help description for each configuration +# enable_modelarts: "Whether training on modelarts, default: False" +# data_url: "Dataset url for obs" +# checkpoint_url: "The location of checkpoint for obs" +# data_path: "Dataset path for local" +# output_path: "Training output path for local" +# load_path: "The location of checkpoint for obs" +# device_target: "Target device type, available: [Ascend, GPU, CPU]" +# enable_profiling: "Whether enable profiling while training, default: False" +# num_classes: "Class for dataset" +# batch_size: "Batch size for training and evaluation" +# epoch_size: 37 +# checkpoint_path: "The location of the checkpoint file." +# checkpoint_file_path: "The location of the checkpoint file." +# save_graphs: "Whether save graphs during training, default: False." +# save_graphs_path: "Path to save graphs." +# img_path: "image file path." diff --git a/benchmark/ascend/resnet/config/resnet50_imagenet2012_Boost_config_64p.yaml b/benchmark/ascend/resnet/config/resnet50_imagenet2012_Boost_config_64p.yaml new file mode 100644 index 000000000..2b09aba50 --- /dev/null +++ b/benchmark/ascend/resnet/config/resnet50_imagenet2012_Boost_config_64p.yaml @@ -0,0 +1,114 @@ +# Builtin Configurations(DO NOT CHANGE THESE CONFIGURATIONS unless you know exactly what you are doing) +enable_modelarts: False +# Url for modelarts +data_url: "" +train_url: "" +checkpoint_url: "" +# Path for local +run_distribute: True +enable_profiling: False +data_path: "/data/resnet_tc/Imagenet2012/train" +output_dir: "../outputs" +load_path: "/cache/checkpoint_path/" +device_target: "Ascend" +checkpoint_path: "./checkpoint/" +checkpoint_file_path: "" + +# ============================================================================== +# Training options +optimizer: "LARS" +infer_label: "" +class_num: 1001 +batch_size: 96 +eval_batch_size: 125 +loss_scale: 1024 +momentum: 0.9 +weight_decay: 5.0e-05 +epoch_size: 42 +start_epoch: 0 +resume_ckpt: "" +save_checkpoint: False +save_checkpoint_epochs: 5 +keep_checkpoint_max: 10 +warmup_epochs: 5 +lr_decay_mode: "poly" +use_label_smooth: True +label_smooth_factor: 0.1 +lr_init: 0 +lr_max: 17.5 +lr_end: 0.0001 +lars_epsilon: 0.0 +lars_coefficient: 0.001 + +net_name: "resnet50" +dataset: "imagenet2012" +device_num: 64 +pre_trained: "" +run_eval: True +eval_dataset_path: "/data/resnet_tc/Imagenet2012/val" +parameter_server: False +filter_weight: False +save_best_ckpt: False +eval_start_epoch: 4 +eval_interval: 4 +enable_cache: False +cache_session_id: "" +mode_name: "GRAPH" +boost_mode: "O1" +conv_init: "TruncatedNormal" +dense_init: "TruncatedNormal" +all_reduce_fusion_config: + - 85 + - 160 +train_image_size: 192 +eval_image_size: 224 +max_device_memory: "30GB" + +# Export options +device_id: 0 +width: 224 +height: 224 +file_name: "resnet50" +file_format: "MINDIR" +ckpt_file: "" +network_dataset: "resnet50_imagenet2012" + +# Retrain options +save_graphs: False +save_graphs_path: "./graphs" +has_trained_epoch: 0 +has_trained_step: 0 + +# postprocess resnet inference +result_path: '' +label_path: '' + +# prediction +img_path: '' + +# lite inference +enable_predict: False +enable_predict_lite_backend: False +enable_predict_lite_mindir: False + +# lite mindir inference +mindir_path: 'net.mindir' + + +# # Help description for each configuration +# enable_modelarts: "Whether training on modelarts, default: False" +# data_url: "Dataset url for obs" +# checkpoint_url: "The location of checkpoint for obs" +# data_path: "Dataset path for local" +# output_path: "Training output path for local" +# load_path: "The location of checkpoint for obs" +# device_target: "Target device type, available: [Ascend, GPU, CPU]" +# enable_profiling: "Whether enable profiling while training, default: False" +# num_classes: "Class for dataset" +# batch_size: "Batch size for training and evaluation" +# epoch_size: 37 +# checkpoint_path: "The location of the checkpoint file." +# checkpoint_file_path: "The location of the checkpoint file." +# save_graphs: "Whether save graphs during training, default: False." +# save_graphs_path: "Path to save graphs." +# img_path: "image file path." -- Gitee