Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_77200941
mindspore
提交
48efc182
M
mindspore
项目概览
2301_77200941
/
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
48efc182
编写于
8月 26, 2020
作者:
Y
yuchaojie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change option choices for transformer
上级
5fc18b98
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
7 deletion
+12
-7
model_zoo/official/cv/faster_rcnn/train.py
model_zoo/official/cv/faster_rcnn/train.py
+2
-1
model_zoo/official/nlp/transformer/train.py
model_zoo/official/nlp/transformer/train.py
+10
-6
未找到文件。
model_zoo/official/cv/faster_rcnn/train.py
浏览文件 @
48efc182
...
...
@@ -18,6 +18,7 @@
import
os
import
time
import
argparse
import
ast
import
random
import
numpy
as
np
...
...
@@ -41,7 +42,7 @@ np.random.seed(1)
de
.
config
.
set_seed
(
1
)
parser
=
argparse
.
ArgumentParser
(
description
=
"FasterRcnn training"
)
parser
.
add_argument
(
"--run_distribute"
,
type
=
boo
l
,
default
=
False
,
help
=
"Run distribute, default: false."
)
parser
.
add_argument
(
"--run_distribute"
,
type
=
ast
.
literal_eva
l
,
default
=
False
,
help
=
"Run distribute, default: false."
)
parser
.
add_argument
(
"--dataset"
,
type
=
str
,
default
=
"coco"
,
help
=
"Dataset name, default: coco."
)
parser
.
add_argument
(
"--pre_trained"
,
type
=
str
,
default
=
""
,
help
=
"Pretrained file path."
)
parser
.
add_argument
(
"--device_id"
,
type
=
int
,
default
=
0
,
help
=
"Device id, default: 0."
)
...
...
model_zoo/official/nlp/transformer/train.py
浏览文件 @
48efc182
...
...
@@ -89,16 +89,20 @@ def argparse_init():
Argparse init.
"""
parser
=
argparse
.
ArgumentParser
(
description
=
'transformer'
)
parser
.
add_argument
(
"--distribute"
,
type
=
str
,
default
=
"false"
,
help
=
"Run distribute, default is false."
)
parser
.
add_argument
(
"--distribute"
,
type
=
str
,
default
=
"false"
,
choices
=
[
'true'
,
'false'
],
help
=
"Run distribute, default is false."
)
parser
.
add_argument
(
"--epoch_size"
,
type
=
int
,
default
=
52
,
help
=
"Epoch size, default is 52."
)
parser
.
add_argument
(
"--device_id"
,
type
=
int
,
default
=
0
,
help
=
"Device id, default is 0."
)
parser
.
add_argument
(
"--device_num"
,
type
=
int
,
default
=
1
,
help
=
"Use device nums, default is 1."
)
parser
.
add_argument
(
"--enable_lossscale"
,
type
=
str
,
default
=
"true"
,
help
=
"Use lossscale or not, default is true."
)
parser
.
add_argument
(
"--do_shuffle"
,
type
=
str
,
default
=
"true"
,
help
=
"Enable shuffle for dataset, default is true."
)
parser
.
add_argument
(
"--enable_data_sink"
,
type
=
str
,
default
=
"false"
,
help
=
"Enable data sink, default is false."
)
parser
.
add_argument
(
"--enable_lossscale"
,
type
=
str
,
default
=
"true"
,
choices
=
[
'true'
,
'false'
],
help
=
"Use lossscale or not, default is true."
)
parser
.
add_argument
(
"--do_shuffle"
,
type
=
str
,
default
=
"true"
,
choices
=
[
'true'
,
'false'
],
help
=
"Enable shuffle for dataset, default is true."
)
parser
.
add_argument
(
"--enable_data_sink"
,
type
=
str
,
default
=
"false"
,
choices
=
[
'true'
,
'false'
],
help
=
"Enable data sink, default is false."
)
parser
.
add_argument
(
"--checkpoint_path"
,
type
=
str
,
default
=
""
,
help
=
"Checkpoint file path"
)
parser
.
add_argument
(
"--enable_save_ckpt"
,
type
=
str
,
default
=
"true"
,
help
=
"Enable save checkpoint, "
"
default is true."
)
parser
.
add_argument
(
"--enable_save_ckpt"
,
type
=
str
,
default
=
"true"
,
choices
=
[
'true'
,
'false'
],
help
=
"Enable save checkpoint,
default is true."
)
parser
.
add_argument
(
"--save_checkpoint_steps"
,
type
=
int
,
default
=
2500
,
help
=
"Save checkpoint steps, "
"default is 2500."
)
parser
.
add_argument
(
"--save_checkpoint_num"
,
type
=
int
,
default
=
30
,
help
=
"Save checkpoint numbers, default is 30."
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录