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 0000000000000000000000000000000000000000..0cc938d6c479451d97af2fce8a3bf42d01082994 --- /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 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 db657d20a4d58c436751a3b7c6f7031bd4e75901..ddf85405eea9f37729e2536d7b5129d0a9976d29 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)