Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
da41c9d6
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看板
提交
da41c9d6
编写于
9月 08, 2020
作者:
P
Payne
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify wrong args
上级
b7425d3e
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
10 addition
and
10 deletion
+10
-10
model_zoo/official/cv/mobilenetv2/src/config.py
model_zoo/official/cv/mobilenetv2/src/config.py
+8
-7
model_zoo/official/cv/mobilenetv2/src/utils.py
model_zoo/official/cv/mobilenetv2/src/utils.py
+1
-2
model_zoo/official/cv/mobilenetv2/train.py
model_zoo/official/cv/mobilenetv2/train.py
+1
-1
未找到文件。
model_zoo/official/cv/mobilenetv2/src/config.py
浏览文件 @
da41c9d6
...
@@ -26,8 +26,9 @@ def set_config(args):
...
@@ -26,8 +26,9 @@ def set_config(args):
"batch_size"
:
150
,
"batch_size"
:
150
,
"epoch_size"
:
15
,
"epoch_size"
:
15
,
"warmup_epochs"
:
0
,
"warmup_epochs"
:
0
,
"lr_
max"
:
0.03
,
"lr_
init"
:
.
0
,
"lr_end"
:
0.03
,
"lr_end"
:
0.03
,
"lr_max"
:
0.03
,
"momentum"
:
0.9
,
"momentum"
:
0.9
,
"weight_decay"
:
4e-5
,
"weight_decay"
:
4e-5
,
"label_smooth"
:
0.1
,
"label_smooth"
:
0.1
,
...
@@ -45,9 +46,9 @@ def set_config(args):
...
@@ -45,9 +46,9 @@ def set_config(args):
"batch_size"
:
150
,
"batch_size"
:
150
,
"epoch_size"
:
200
,
"epoch_size"
:
200
,
"warmup_epochs"
:
0
,
"warmup_epochs"
:
0
,
"lr
"
:
0.8
,
"lr
_init"
:
.
0
,
"lr_
max"
:
0.03
,
"lr_
end"
:
.
0
,
"lr_
end"
:
0.03
,
"lr_
max"
:
0.8
,
"momentum"
:
0.9
,
"momentum"
:
0.9
,
"weight_decay"
:
4e-5
,
"weight_decay"
:
4e-5
,
"label_smooth"
:
0.1
,
"label_smooth"
:
0.1
,
...
@@ -66,9 +67,9 @@ def set_config(args):
...
@@ -66,9 +67,9 @@ def set_config(args):
"batch_size"
:
256
,
"batch_size"
:
256
,
"epoch_size"
:
200
,
"epoch_size"
:
200
,
"warmup_epochs"
:
4
,
"warmup_epochs"
:
4
,
"lr
"
:
0.4
,
"lr
_init"
:
0.00
,
"lr_
max"
:
0.03
,
"lr_
end"
:
0.00
,
"lr_
end"
:
0.03
,
"lr_
max"
:
0.4
,
"momentum"
:
0.9
,
"momentum"
:
0.9
,
"weight_decay"
:
4e-5
,
"weight_decay"
:
4e-5
,
"label_smooth"
:
0.1
,
"label_smooth"
:
0.1
,
...
...
model_zoo/official/cv/mobilenetv2/src/utils.py
浏览文件 @
da41c9d6
...
@@ -17,7 +17,6 @@ from mindspore import context
...
@@ -17,7 +17,6 @@ from mindspore import context
from
mindspore
import
nn
from
mindspore
import
nn
from
mindspore.common
import
dtype
as
mstype
from
mindspore.common
import
dtype
as
mstype
from
mindspore.train.model
import
ParallelMode
from
mindspore.train.model
import
ParallelMode
from
mindspore.parallel._auto_parallel_context
import
auto_parallel_context
from
mindspore.train.callback
import
ModelCheckpoint
,
CheckpointConfig
from
mindspore.train.callback
import
ModelCheckpoint
,
CheckpointConfig
from
mindspore.communication.management
import
get_rank
,
init
,
get_group_size
from
mindspore.communication.management
import
get_rank
,
init
,
get_group_size
...
@@ -63,7 +62,7 @@ def set_context(config):
...
@@ -63,7 +62,7 @@ def set_context(config):
device_id
=
config
.
device_id
,
save_graphs
=
False
)
device_id
=
config
.
device_id
,
save_graphs
=
False
)
elif
config
.
platform
==
"GPU"
:
elif
config
.
platform
==
"GPU"
:
context
.
set_context
(
mode
=
context
.
GRAPH_MODE
,
context
.
set_context
(
mode
=
context
.
GRAPH_MODE
,
device_target
=
args_opt
.
platform
,
save_graphs
=
False
)
device_target
=
config
.
platform
,
save_graphs
=
False
)
def
config_ckpoint
(
config
,
lr
,
step_size
):
def
config_ckpoint
(
config
,
lr
,
step_size
):
cb
=
None
cb
=
None
...
...
model_zoo/official/cv/mobilenetv2/train.py
浏览文件 @
da41c9d6
...
@@ -77,7 +77,7 @@ if __name__ == '__main__':
...
@@ -77,7 +77,7 @@ if __name__ == '__main__':
# get learning rate
# get learning rate
lr
=
Tensor
(
get_lr
(
global_step
=
0
,
lr
=
Tensor
(
get_lr
(
global_step
=
0
,
lr_init
=
0
,
lr_init
=
config
.
lr_init
,
lr_end
=
config
.
lr_end
,
lr_end
=
config
.
lr_end
,
lr_max
=
config
.
lr_max
,
lr_max
=
config
.
lr_max
,
warmup_epochs
=
config
.
warmup_epochs
,
warmup_epochs
=
config
.
warmup_epochs
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录