Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
b42ba6c4
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看板
提交
b42ba6c4
编写于
5月 26, 2020
作者:
C
chenzomi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug in model zoo for mobilenet
上级
93fc82b8
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
27 addition
and
25 deletion
+27
-25
mindspore/model_zoo/mobilenetv2/Readme.md
mindspore/model_zoo/mobilenetv2/Readme.md
+1
-1
mindspore/model_zoo/mobilenetv2/eval.py
mindspore/model_zoo/mobilenetv2/eval.py
+3
-1
mindspore/model_zoo/mobilenetv2/scripts/run_infer.sh
mindspore/model_zoo/mobilenetv2/scripts/run_infer.sh
+1
-1
mindspore/model_zoo/mobilenetv2/scripts/run_train.sh
mindspore/model_zoo/mobilenetv2/scripts/run_train.sh
+4
-4
mindspore/model_zoo/mobilenetv2/train.py
mindspore/model_zoo/mobilenetv2/train.py
+1
-1
mindspore/model_zoo/mobilenetv3/Readme.md
mindspore/model_zoo/mobilenetv3/Readme.md
+1
-1
mindspore/model_zoo/mobilenetv3/scripts/run_infer.sh
mindspore/model_zoo/mobilenetv3/scripts/run_infer.sh
+5
-5
mindspore/model_zoo/mobilenetv3/scripts/run_train.sh
mindspore/model_zoo/mobilenetv3/scripts/run_train.sh
+11
-11
未找到文件。
mindspore/model_zoo/mobilenetv2/Readme.md
浏览文件 @
b42ba6c4
...
...
@@ -133,7 +133,7 @@ result: {'acc': 0.71976314102564111} ckpt=/path/to/checkpoint/mobilenet-200_625.
#### Inference Performance
| Parameters |
GoogLeNet
| | |
| Parameters |
| | |
| -------------------------- | ----------------------------- | ------------------------- | -------------------- |
| Model Version | V1 | | |
| Resource | Huawei 910 | NV SMX2 V100-32G | Huawei 310 |
...
...
mindspore/model_zoo/mobilenetv2/eval.py
浏览文件 @
b42ba6c4
...
...
@@ -36,21 +36,23 @@ args_opt = parser.parse_args()
if
__name__
==
'__main__'
:
config_platform
=
None
net
=
None
if
args_opt
.
platform
==
"Ascend"
:
config_platform
=
config_ascend
device_id
=
int
(
os
.
getenv
(
'DEVICE_ID'
))
context
.
set_context
(
mode
=
context
.
GRAPH_MODE
,
device_target
=
"Ascend"
,
device_id
=
device_id
,
save_graphs
=
False
)
net
=
mobilenet_v2
(
num_classes
=
config_platform
.
num_classes
,
platform
=
"Ascend"
)
elif
args_opt
.
platform
==
"GPU"
:
config_platform
=
config_gpu
context
.
set_context
(
mode
=
context
.
GRAPH_MODE
,
device_target
=
"GPU"
,
save_graphs
=
False
)
net
=
mobilenet_v2
(
num_classes
=
config_platform
.
num_classes
,
platform
=
"GPU"
)
else
:
raise
ValueError
(
"Unsupport platform."
)
loss
=
nn
.
SoftmaxCrossEntropyWithLogits
(
is_grad
=
False
,
sparse
=
True
,
reduction
=
'mean'
)
net
=
mobilenet_v2
(
num_classes
=
config_platform
.
num_classes
)
if
args_opt
.
platform
==
"Ascend"
:
net
.
to_float
(
mstype
.
float16
)
...
...
mindspore/model_zoo/mobilenetv2/scripts/run_infer.sh
浏览文件 @
b42ba6c4
...
...
@@ -52,4 +52,4 @@ python ${BASEPATH}/../eval.py \
--platform
=
$1
\
--dataset_path
=
$2
\
--checkpoint_path
=
$3
\
&> infer.log &
# dataset val folder path
&>
../
infer.log &
# dataset val folder path
mindspore/model_zoo/mobilenetv2/scripts/run_train.sh
浏览文件 @
b42ba6c4
...
...
@@ -36,13 +36,13 @@ run_ascend()
fi
mkdir
../train
cd
../train
||
exit
python
${
BASEPATH
}
/../launch.py
\
python
${
BASEPATH
}
/../
src/
launch.py
\
--nproc_per_node
=
$2
\
--visible_devices
=
$4
\
--server_id
=
$3
\
--training_script
=
${
BASEPATH
}
/train.py
\
--training_script
=
${
BASEPATH
}
/
../
train.py
\
--dataset_path
=
$5
\
--platform
=
$1
&> train.log &
# dataset train folder
--platform
=
$1
&>
../
train.log &
# dataset train folder
}
run_gpu
()
...
...
@@ -73,7 +73,7 @@ run_gpu()
python
${
BASEPATH
}
/../train.py
\
--dataset_path
=
$4
\
--platform
=
$1
\
&> train.log &
# dataset train folder
&>
../
train.log &
# dataset train folder
}
if
[
$#
-gt
5
]
||
[
$#
-lt
4
]
...
...
mindspore/model_zoo/mobilenetv2/train.py
浏览文件 @
b42ba6c4
...
...
@@ -216,7 +216,7 @@ if __name__ == '__main__':
init
()
epoch_size
=
config_ascend
.
epoch_size
net
=
mobilenet_v2
(
num_classes
=
config_ascend
.
num_classes
)
net
=
mobilenet_v2
(
num_classes
=
config_ascend
.
num_classes
,
platform
=
"Ascend"
)
net
.
to_float
(
mstype
.
float16
)
for
_
,
cell
in
net
.
cells_and_names
():
if
isinstance
(
cell
,
nn
.
Dense
):
...
...
mindspore/model_zoo/mobilenetv3/Readme.md
浏览文件 @
b42ba6c4
...
...
@@ -133,7 +133,7 @@ result: {'acc': 0.71976314102564111} ckpt=/path/to/checkpoint/mobilenet-200_625.
#### Inference Performance
| Parameters |
GoogLeNet
| | |
| Parameters |
| | |
| -------------------------- | ----------------------------- | ------------------------- | -------------------- |
| Model Version | V1 | | |
| Resource | Huawei 910 | NV SMX2 V100-32G | Huawei 310 |
...
...
mindspore/model_zoo/mobilenetv3/scripts/run_infer.sh
浏览文件 @
b42ba6c4
...
...
@@ -42,14 +42,14 @@ export RANK_ID=0
export
RANK_SIZE
=
1
if
[
-d
"eval"
]
;
then
rm
-rf
./eval
rm
-rf
.
.
/eval
fi
mkdir
./eval
cd
./eval
||
exit
mkdir
.
.
/eval
cd
.
.
/eval
||
exit
# luanch
python
${
BASEPATH
}
/eval.py
\
python
${
BASEPATH
}
/
../
eval.py
\
--platform
=
$1
\
--dataset_path
=
$2
\
--checkpoint_path
=
$3
\
&> infer.log &
# dataset val folder path
&>
../
infer.log &
# dataset val folder path
mindspore/model_zoo/mobilenetv3/scripts/run_train.sh
浏览文件 @
b42ba6c4
...
...
@@ -31,17 +31,17 @@ run_ascend()
export
PYTHONPATH
=
${
BASEPATH
}
:
$PYTHONPATH
if
[
-d
"train"
]
;
then
rm
-rf
./train
rm
-rf
.
.
/train
fi
mkdir
./train
cd
./train
||
exit
python
${
BASEPATH
}
/launch.py
\
mkdir
.
.
/train
cd
.
.
/train
||
exit
python
${
BASEPATH
}
/
../src/
launch.py
\
--nproc_per_node
=
$2
\
--visible_devices
=
$4
\
--server_id
=
$3
\
--training_script
=
${
BASEPATH
}
/train.py
\
--training_script
=
${
BASEPATH
}
/
../
train.py
\
--dataset_path
=
$5
\
--platform
=
$1
&> train.log &
# dataset train folder
--platform
=
$1
&>
../
train.log &
# dataset train folder
}
run_gpu
()
...
...
@@ -62,17 +62,17 @@ run_gpu()
export
PYTHONPATH
=
${
BASEPATH
}
:
$PYTHONPATH
if
[
-d
"train"
]
;
then
rm
-rf
./train
rm
-rf
.
.
/train
fi
mkdir
./train
cd
./train
||
exit
mkdir
.
.
/train
cd
.
.
/train
||
exit
export
CUDA_VISIBLE_DEVICES
=
"
$3
"
mpirun
-n
$2
--allow-run-as-root
\
python
${
BASEPATH
}
/train.py
\
python
${
BASEPATH
}
/
../
train.py
\
--dataset_path
=
$4
\
--platform
=
$1
\
&> train.log &
# dataset train folder
&>
../
train.log &
# dataset train folder
}
if
[
$#
-gt
5
]
||
[
$#
-lt
4
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录