Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
1e0088bd
M
mindinsight
项目概览
MindSpore
/
mindinsight
通知
7
Star
3
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindinsight
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1e0088bd
编写于
8月 26, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 26, 2020
浏览文件
操作
浏览文件
下载
差异文件
!572 optimize mindwizard network templates for r0.7
Merge pull request !572 from liangyongxiong/r0.7
上级
7891976d
8e17bc97
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
9 addition
and
25 deletion
+9
-25
mindinsight/wizard/README_CN.md
mindinsight/wizard/README_CN.md
+4
-4
mindinsight/wizard/base/source_file.py
mindinsight/wizard/base/source_file.py
+1
-0
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train.sh-tpl
...lates/network/alexnet/scripts/run_distribute_train.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train_gpu.sh-tpl
...s/network/alexnet/scripts/run_distribute_train_gpu.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval.sh-tpl
...rd/conf/templates/network/alexnet/scripts/run_eval.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval_gpu.sh-tpl
...onf/templates/network/alexnet/scripts/run_eval_gpu.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train.sh-tpl
...lates/network/alexnet/scripts/run_standalone_train.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train_gpu.sh-tpl
...s/network/alexnet/scripts/run_standalone_train_gpu.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/alexnet/src/config.py-tpl
...t/wizard/conf/templates/network/alexnet/src/config.py-tpl
+1
-1
mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train.sh-tpl
...mplates/network/lenet/scripts/run_distribute_train.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train_gpu.sh-tpl
...tes/network/lenet/scripts/run_distribute_train_gpu.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval.sh-tpl
...zard/conf/templates/network/lenet/scripts/run_eval.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval_gpu.sh-tpl
.../conf/templates/network/lenet/scripts/run_eval_gpu.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train.sh-tpl
...mplates/network/lenet/scripts/run_standalone_train.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train_gpu.sh-tpl
...tes/network/lenet/scripts/run_standalone_train_gpu.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/lenet/src/config.py-tpl
...ght/wizard/conf/templates/network/lenet/src/config.py-tpl
+1
-1
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train.sh-tpl
...ates/network/resnet50/scripts/run_distribute_train.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train_gpu.sh-tpl
.../network/resnet50/scripts/run_distribute_train_gpu.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval.sh-tpl
...d/conf/templates/network/resnet50/scripts/run_eval.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval_gpu.sh-tpl
...nf/templates/network/resnet50/scripts/run_eval_gpu.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train.sh-tpl
...ates/network/resnet50/scripts/run_standalone_train.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train_gpu.sh-tpl
.../network/resnet50/scripts/run_standalone_train_gpu.sh-tpl
+0
-1
mindinsight/wizard/conf/templates/network/resnet50/src/config.py-tpl
.../wizard/conf/templates/network/resnet50/src/config.py-tpl
+1
-1
mindinsight/wizard/create_project.py
mindinsight/wizard/create_project.py
+1
-0
未找到文件。
mindinsight/wizard/README_CN.md
浏览文件 @
1e0088bd
...
...
@@ -4,7 +4,7 @@
## 介绍
MindWizard是一款快速生成经典网络脚本的工具。工具根据用户选择,组合模型、超参、数据集等网络参数,自动生成目标网络脚本,生成的网络脚本可以在Ascend或GPU等环境上进行训练和
推理
。
MindWizard是一款快速生成经典网络脚本的工具。工具根据用户选择,组合模型、超参、数据集等网络参数,自动生成目标网络脚本,生成的网络脚本可以在Ascend或GPU等环境上进行训练和
评估
。
## 安装
...
...
@@ -33,7 +33,7 @@ optional arguments:
2.
请选择数据集(MNIST / Cifar10 / ImageNet / ...)
生成脚本后,用户可执行训练和
推理
,详细介绍可参考网络脚本工程中的README。
生成脚本后,用户可执行训练和
评估
,详细介绍可参考网络脚本工程中的README。
## 网络脚本工程结构
...
...
@@ -42,14 +42,14 @@ project
|- script
| |- run_standalone_train.sh
# 单卡训练脚本
| |- run_distribute_train.sh
# 多卡训练脚本
| |- run_eval.sh
#
推理
脚本
| |- run_eval.sh
#
评估
脚本
| |- ...
|- src
| |- config.py
# 参数配置
| |- dataset.py
# 数据集处理
| |- lenet.py/resent.py/...
# 网络定义
| |- ...
|- eval.py
# 网络
推理
|- eval.py
# 网络
评估
|- train.py
# 网络训练
|- README.md
```
...
...
mindinsight/wizard/base/source_file.py
浏览文件 @
1e0088bd
...
...
@@ -45,6 +45,7 @@ class SourceFile:
fp
.
write
(
self
.
content
)
try
:
shutil
.
copymode
(
self
.
template_file_path
,
new_file_path
)
os
.
chmod
(
new_file_path
,
stat
.
S_IRUSR
|
stat
.
S_IWUSR
)
self
.
set_writeable
(
new_file_path
)
if
new_file_path
.
endswith
(
'.sh'
):
self
.
set_executable
(
new_file_path
)
...
...
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -67,7 +67,6 @@ do
rm
-rf
./train_parallel
$i
mkdir
./train_parallel
$i
cp
../
*
.py ./train_parallel
$i
cp
*
.sh ./train_parallel
$i
cp
-r
../src ./train_parallel
$i
cd
./train_parallel
$i
||
exit
echo
"start training for rank
$RANK_ID
, device
$DEVICE_ID
"
...
...
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_distribute_train_gpu.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -54,7 +54,6 @@ export RANK_SIZE=$DEVICE_NUM
rm
-rf
./train_parallel
mkdir
./train_parallel
cp
../
*
.py ./train_parallel
cp
*
.sh ./train_parallel
cp
-r
../src ./train_parallel
cd
./train_parallel
||
exit
echo
"start training"
...
...
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -56,7 +56,6 @@ then
fi
mkdir
./eval
cp
../
*
.py ./eval
cp
*
.sh ./eval
cp
-r
../src ./eval
cd
./eval
||
exit
env
>
env.log
...
...
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_eval_gpu.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -57,7 +57,6 @@ then
fi
mkdir
./eval
cp
../
*
.py ./eval
cp
*
.sh ./eval
cp
-r
../src ./eval
cd
./eval
||
exit
env
>
env.log
...
...
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -59,7 +59,6 @@ then
fi
mkdir
./train
cp
../
*
.py ./train
cp
*
.sh ./train
cp
-r
../src ./train
cd
./train
||
exit
echo
"start training for device
$DEVICE_ID
"
...
...
mindinsight/wizard/conf/templates/network/alexnet/scripts/run_standalone_train_gpu.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -59,7 +59,6 @@ then
fi
mkdir
./train
cp
../
*
.py ./train
cp
*
.sh ./train
cp
-r
../src ./train
cd
./train
||
exit
echo
"start training"
...
...
mindinsight/wizard/conf/templates/network/alexnet/src/config.py-tpl
浏览文件 @
1e0088bd
...
...
@@ -28,7 +28,7 @@ cfg = edict({
'lr': 0.002,
"momentum": 0.9,
{% elif optimizer=='SGD' %}
'lr': 0.1,
'lr': 0.
0
1,
{% else %}
'lr': 0.001,
{% endif %}
...
...
mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -68,7 +68,6 @@ do
rm
-rf
./train_parallel
$i
mkdir
./train_parallel
$i
cp
../
*
.py ./train_parallel
$i
cp
*
.sh ./train_parallel
$i
cp
-r
../src ./train_parallel
$i
cd
./train_parallel
$i
||
exit
echo
"start training for rank
$RANK_ID
, device
$DEVICE_ID
"
...
...
mindinsight/wizard/conf/templates/network/lenet/scripts/run_distribute_train_gpu.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -53,7 +53,6 @@ export RANK_SIZE=$DEVICE_NUM
rm
-rf
./train_parallel
mkdir
./train_parallel
cp
../
*
.py ./train_parallel
cp
*
.sh ./train_parallel
cp
-r
../src ./train_parallel
cd
./train_parallel
||
exit
...
...
mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -56,7 +56,6 @@ then
fi
mkdir
./eval
cp
../
*
.py ./eval
cp
*
.sh ./eval
cp
-r
../src ./eval
cd
./eval
||
exit
env
>
env.log
...
...
mindinsight/wizard/conf/templates/network/lenet/scripts/run_eval_gpu.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -57,7 +57,6 @@ then
fi
mkdir
./eval
cp
../
*
.py ./eval
cp
*
.sh ./eval
cp
-r
../src ./eval
cd
./eval
||
exit
env
>
env.log
...
...
mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -60,7 +60,6 @@ then
fi
mkdir
./train
cp
../
*
.py ./train
cp
*
.sh ./train
cp
-r
../src ./train
cd
./train
||
exit
echo
"start training for device
$DEVICE_ID
"
...
...
mindinsight/wizard/conf/templates/network/lenet/scripts/run_standalone_train_gpu.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -61,7 +61,6 @@ then
fi
mkdir
./train
cp
../
*
.py ./train
cp
*
.sh ./train
cp
-r
../src ./train
cd
./train
||
exit
...
...
mindinsight/wizard/conf/templates/network/lenet/src/config.py-tpl
浏览文件 @
1e0088bd
...
...
@@ -23,7 +23,7 @@ cfg = edict({
'lr': 0.01,
"momentum": 0.9,
{% elif optimizer=='SGD' %}
'lr': 0.1,
'lr': 0.
0
1,
{% else %}
'lr': 0.001,
{% endif %}
...
...
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -67,7 +67,6 @@ do
rm
-rf
./train_parallel
$i
mkdir
./train_parallel
$i
cp
../
*
.py ./train_parallel
$i
cp
*
.sh ./train_parallel
$i
cp
-r
../src ./train_parallel
$i
cd
./train_parallel
$i
||
exit
echo
"start training for rank
$RANK_ID
, device
$DEVICE_ID
"
...
...
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_distribute_train_gpu.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -54,7 +54,6 @@ export RANK_SIZE=$DEVICE_NUM
rm
-rf
./train_parallel
mkdir
./train_parallel
cp
../
*
.py ./train_parallel
cp
*
.sh ./train_parallel
cp
-r
../src ./train_parallel
cd
./train_parallel
||
exit
...
...
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -56,7 +56,6 @@ then
fi
mkdir
./eval
cp
../
*
.py ./eval
cp
*
.sh ./eval
cp
-r
../src ./eval
cd
./eval
||
exit
env
>
env.log
...
...
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_eval_gpu.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -57,7 +57,6 @@ then
fi
mkdir
./eval
cp
../
*
.py ./eval
cp
*
.sh ./eval
cp
-r
../src ./eval
cd
./eval
||
exit
env
>
env.log
...
...
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -59,7 +59,6 @@ then
fi
mkdir
./train
cp
../
*
.py ./train
cp
*
.sh ./train
cp
-r
../src ./train
cd
./train
||
exit
echo
"start training for device
$DEVICE_ID
"
...
...
mindinsight/wizard/conf/templates/network/resnet50/scripts/run_standalone_train_gpu.sh-tpl
浏览文件 @
1e0088bd
...
...
@@ -59,7 +59,6 @@ then
fi
mkdir
./train
cp
../
*
.py ./train
cp
*
.sh ./train
cp
-r
../src ./train
cd
./train
||
exit
echo
"start training"
...
...
mindinsight/wizard/conf/templates/network/resnet50/src/config.py-tpl
浏览文件 @
1e0088bd
...
...
@@ -30,7 +30,7 @@ cfg = ed({
"momentum": 0.9,
"lr": 0.01,
{% elif optimizer=='SGD' %}
'lr': 0.1,
'lr': 0.
0
1,
{% else %}
'lr': 0.001,
{% endif %}
...
...
mindinsight/wizard/create_project.py
浏览文件 @
1e0088bd
...
...
@@ -91,6 +91,7 @@ class CreateProject(BaseCommand):
if
not
choice
:
click
.
secho
(
textwrap
.
dedent
(
"Network is required."
),
fg
=
'red'
)
click
.
secho
(
textwrap
.
dedent
(
"Your choice is %s."
%
network_type_choices
[
choice
-
1
]),
fg
=
'yellow'
)
return
network_type_choices
[
choice
-
1
]
@
staticmethod
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录