From 5cef10121635c1d725d4f8ad5b4e34b903e25e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=B2=BE=E7=A7=91?= <2351312060@qq.com> Date: Thu, 31 Mar 2022 09:23:11 +0000 Subject: [PATCH 1/2] /detection/RetinaNet_for_PyTorch/test/retinanet_r50_fpn_1x_coco.py. --- .../test/retinanet_r50_fpn_1x_coco.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/retinanet_r50_fpn_1x_coco.py diff --git a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/retinanet_r50_fpn_1x_coco.py b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/retinanet_r50_fpn_1x_coco.py new file mode 100644 index 0000000000..0cc938d6c4 --- /dev/null +++ b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/retinanet_r50_fpn_1x_coco.py @@ -0,0 +1,35 @@ +# Copyright 2021 Huawei Technologies Co., Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +_base_ = [ + '../_base_/models/retinanet_r50_fpn.py', + '../_base_/datasets/coco_detection.py', + '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' +] +# optimizer +optimizer = dict(type='NpuFusedSGD', lr=0.01, momentum=0.9, weight_decay=0.0001) +log_config = dict( # config to register logger hook + interval=10, # Interval to print the log + hooks=[ + dict(type='TextLoggerHook') + ]) + +dist_params = dict(backend='hccl') +data = dict( + samples_per_gpu=8, + workers_per_gpu=8 +) + +#optimizer_config = dict(_delete_=True, grad_clip=dict(max_norm=10, norm_type=2)) +total_epochs = 1 \ No newline at end of file -- Gitee From b3b33be411f3cf7e7fc82eea71daef15ac37b568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=B2=BE=E7=A7=91?= <2351312060@qq.com> Date: Thu, 31 Mar 2022 09:25:43 +0000 Subject: [PATCH 2/2] /RetinaNet_for_PyTorch/test/train_performance_8p.sh. --- .../detection/RetinaNet_for_PyTorch/test/train_performance_8p.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_performance_8p.sh b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_performance_8p.sh index db657d20a4..ddf85405ee 100644 --- a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_performance_8p.sh +++ b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_performance_8p.sh @@ -111,6 +111,7 @@ fi mkdir -p $cur_path/../data ln -snf $data_path/coco $cur_path/../data/ cp train_retinanet_8p.sh $cur_path/../ +cp retinanet_r50_fpn_1x_coco.py $cur_path/../configs/retinanet/retinanet_r50_fpn_1x_coco.py #训练开始时间,不需要修改 start_time=$(date +%s) -- Gitee