Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
c11e064e
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c11e064e
编写于
9月 01, 2020
作者:
W
wangmin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix readme file for resnet_thor
上级
529e1a0a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
9 deletion
+9
-9
model_zoo/official/cv/resnet_thor/README.md
model_zoo/official/cv/resnet_thor/README.md
+8
-8
model_zoo/official/cv/resnet_thor/train.py
model_zoo/official/cv/resnet_thor/train.py
+1
-1
未找到文件。
model_zoo/official/cv/resnet_thor/README.md
浏览文件 @
c11e064e
...
...
@@ -58,7 +58,7 @@ After installing MindSpore via the official website, you can start training and
-
Running on Ascend
```
python
# run distributed training example
sh
scripts
/
run_distribute_train
.
sh
[
RANK_TABLE_FILE
]
[
DATASET_PATH
]
[
DEVICE_NUM
]
sh
run_distribute_train
.
sh
[
RANK_TABLE_FILE
]
[
DATASET_PATH
]
[
DEVICE_NUM
]
# run evaluation example
sh
run_eval
.
sh
[
DATASET_PATH
]
[
CHECKPOINT_PATH
]
...
...
@@ -68,7 +68,7 @@ sh run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH]
-
Running on GPU
```
python
# run distributed training example
sh
scripts
/
run_distribute_train_gpu
.
sh
[
DATASET_PATH
]
[
DEVICE_NUM
]
sh
run_distribute_train_gpu
.
sh
[
DATASET_PATH
]
[
DEVICE_NUM
]
# run evaluation example
sh
run_eval_gpu
.
sh
[
DATASET_PATH
]
[
CHECKPOINT_PATH
]
...
...
@@ -132,18 +132,18 @@ Parameters for both training and inference can be set in config.py.
"loss_scale": 128, # loss scale
"momentum": 0.9, # momentum of THOR optimizer
"weight_decay": 5e-4, # weight decay
"epoch_size": 4
5
, # only valid for taining, which is always 1 for inference
"epoch_size": 4
0
, # only valid for taining, which is always 1 for inference
"save_checkpoint": True, # whether save checkpoint or not
"save_checkpoint_epochs": 1, # the epoch interval between two checkpoints. By default, the checkpoint will be saved every epoch
"keep_checkpoint_max": 15, # only keep the last keep_checkpoint_max checkpoint
"save_checkpoint_path": "./", # path to save checkpoint relative to the executed path
"label_smooth": True, # label smooth
"label_smooth_factor": 0.1, # label smooth factor
"lr_init": 0.0
4,
# learning rate init value
"lr_decay":
5,
# learning rate decay rate value
"lr_end_epoch": 5
8
, # learning rate end epoch value
"damping_init": 0.02
,
# damping init value for Fisher information matrix
"damping_decay": 0.
87,
# damping decay rate
"lr_init": 0.0
5672,
# learning rate init value
"lr_decay":
4.9687,
# learning rate decay rate value
"lr_end_epoch": 5
0
, # learning rate end epoch value
"damping_init": 0.02
345,
# damping init value for Fisher information matrix
"damping_decay": 0.
5467,
# damping decay rate
"frequency": 834, # the step interval to update second-order information matrix
```
### Training Process
...
...
model_zoo/official/cv/resnet_thor/train.py
浏览文件 @
c11e064e
...
...
@@ -118,7 +118,7 @@ if __name__ == '__main__':
# define net
step_size
=
dataset
.
get_dataset_size
()
damping
=
get_model_damping
(
0
,
config
.
damping_init
,
config
.
damping_decay
,
9
0
,
step_size
)
damping
=
get_model_damping
(
0
,
config
.
damping_init
,
config
.
damping_decay
,
7
0
,
step_size
)
lr
=
get_model_lr
(
0
,
config
.
lr_init
,
config
.
lr_decay
,
config
.
lr_end_epoch
,
step_size
,
decay_epochs
=
39
)
net
=
resnet50
(
class_num
=
config
.
class_num
,
damping
=
damping
,
loss_scale
=
config
.
loss_scale
,
frequency
=
config
.
frequency
,
batch_size
=
config
.
batch_size
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录