Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
221cb0332
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
221cb0332
Commits
37dca0bb
Commit
37dca0bb
authored
3 years ago
by
l00486551
Browse files
Options
Downloads
Patches
Plain Diff
fix vgg19 readme and add single train shell
parent
4bd3e376
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
research/cv/vgg19/README_CN.md
+6
-4
6 additions, 4 deletions
research/cv/vgg19/README_CN.md
research/cv/vgg19/scripts/run_standalone_train_ascend.sh
+39
-0
39 additions, 0 deletions
research/cv/vgg19/scripts/run_standalone_train_ascend.sh
with
45 additions
and
4 deletions
research/cv/vgg19/README_CN.md
+
6
−
4
View file @
37dca0bb
...
...
@@ -109,6 +109,8 @@ VGG 19网络主要由几个基本模块(包括卷积层和池化层)和三
```
python
# 训练示例
bash
run_standalone_train_ascend
.
sh
[
YAML_CONFIG_PATH
]
[
DATA_PATH
]
python
train
.
py
--
config_path
=
[
YAML_CONFIG_PATH
]
--
data_dir
=
[
DATA_PATH
]
--
dataset
=
[
DATASET_TYPE
]
>
output
.
train
.
log
2
>&
1
&
# 分布式训练示例
...
...
@@ -386,14 +388,14 @@ has_dropout: True # 是否使用Dropout层
```
bash
num_classes: 1000
# 数据集类数
lr: 0.0
1
# 学习率
lr: 0.0
4
# 学习率
lr_init: 0.01
# 初始学习率
lr_max: 0.1
# 最大学习率
lr_epochs:
'30,60,90,120'
# 基于变化lr的轮次
lr_scheduler:
"cosine_annealing"
# 学习率模式
warmup_epochs: 0
# 热身轮次数
batch_size:
32
# 输入张量的批次大小
max_epoch:
150
# 只对训练有效,推理固定值为1
batch_size:
64
# 输入张量的批次大小
max_epoch:
90
# 只对训练有效,推理固定值为1
momentum: 0.9
# 动量
weight_decay: 1e-4
# 权重衰减
loss_scale: 1024
# 损失放大
...
...
@@ -403,7 +405,7 @@ buffer_size: 10 # 混洗缓冲区大小
image_size:
'224,224'
# 图像大小
pad_mode:
'pad'
# conv2d的填充方式
padding: 1
# conv2d的填充值
has_bias:
True
# conv2d是否有偏差
has_bias:
False
# conv2d是否有偏差
batch_norm: False
# 在conv2d中是否有batch_norm
keep_checkpoint_max: 10
# 只保留最后一个keep_checkpoint_max检查点
initialize_mode:
"KaimingNormal"
# conv2d init模式
...
...
This diff is collapsed.
Click to expand it.
research/cv/vgg19/scripts/run_standalone_train_ascend.sh
0 → 100644
+
39
−
0
View file @
37dca0bb
#!/bin/bash
# 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.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
CONFIG
=
$1
DATA_PATH
=
$2
if
[
$#
!=
2
]
then
echo
"Usage: bash run_standalone_train_ascend.sh [YAML_CONFIG_PATH] [DATA_PATH]"
exit
1
fi
if
[
!
-f
$1
]
then
echo
"error: config_path=
$CONFIG
is not a file."
exit
1
fi
if
[
!
-d
$2
]
then
echo
"error: data_dir=
$DATA_PATH
is not a directory."
exit
1
fi
python ../train.py
--config_path
=
$CONFIG
--data_dir
=
$DATA_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment