Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
b5222937
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看板
提交
b5222937
编写于
4年前
作者:
M
mindspore-ci-bot
提交者:
Gitee
4年前
浏览文件
操作
浏览文件
下载
差异文件
!4931 add script
Merge pull request !4931 from wukesong/add_shell
上级
d184066b
9784a58d
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
226 addition
and
1 deletion
+226
-1
model_zoo/official/cv/alexnet/requirements.txt
model_zoo/official/cv/alexnet/requirements.txt
+2
-0
model_zoo/official/cv/alexnet/scripts/run_standalone_eval_ascend.sh
...official/cv/alexnet/scripts/run_standalone_eval_ascend.sh
+22
-0
model_zoo/official/cv/alexnet/scripts/run_standalone_eval_gpu.sh
...oo/official/cv/alexnet/scripts/run_standalone_eval_gpu.sh
+22
-0
model_zoo/official/cv/alexnet/scripts/run_standalone_train_ascend.sh
...fficial/cv/alexnet/scripts/run_standalone_train_ascend.sh
+22
-0
model_zoo/official/cv/alexnet/scripts/run_standalone_train_gpu.sh
...o/official/cv/alexnet/scripts/run_standalone_train_gpu.sh
+22
-0
model_zoo/official/cv/lenet/requirements.txt
model_zoo/official/cv/lenet/requirements.txt
+1
-0
model_zoo/official/cv/lenet/scripts/run_standalone_eval_ascend.sh
...o/official/cv/lenet/scripts/run_standalone_eval_ascend.sh
+22
-0
model_zoo/official/cv/lenet/scripts/run_standalone_eval_cpu.sh
..._zoo/official/cv/lenet/scripts/run_standalone_eval_cpu.sh
+22
-0
model_zoo/official/cv/lenet/scripts/run_standalone_eval_gpu.sh
..._zoo/official/cv/lenet/scripts/run_standalone_eval_gpu.sh
+22
-0
model_zoo/official/cv/lenet/scripts/run_standalone_train_ascend.sh
.../official/cv/lenet/scripts/run_standalone_train_ascend.sh
+22
-0
model_zoo/official/cv/lenet/scripts/run_standalone_train_cpu.sh
...zoo/official/cv/lenet/scripts/run_standalone_train_cpu.sh
+22
-0
model_zoo/official/cv/lenet/scripts/run_standalone_train_gpu.sh
...zoo/official/cv/lenet/scripts/run_standalone_train_gpu.sh
+22
-0
model_zoo/official/cv/lenet/train.py
model_zoo/official/cv/lenet/train.py
+3
-1
未找到文件。
model_zoo/official/cv/alexnet/requirements.txt
0 → 100644
浏览文件 @
b5222937
easydict
numpy
\ No newline at end of file
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/alexnet/scripts/run_standalone_eval_ascend.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../eval.py
--data_path
=
./
$DATA_PATH
--device_target
=
"Ascend"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/alexnet/scripts/run_standalone_eval_gpu.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../eval.py
--data_path
=
./
$DATA_PATH
--device_target
=
"GPU"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/alexnet/scripts/run_standalone_train_ascend.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial, more
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../train.py
--data_path
=
./
$DATA_PATH
--device_target
=
"Ascend"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/alexnet/scripts/run_standalone_train_gpu.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../train.py
--data_path
=
./
$DATA_PATH
--device_target
=
"GPU"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/lenet/requirements.txt
0 → 100644
浏览文件 @
b5222937
easydict
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/lenet/scripts/run_standalone_eval_ascend.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../eval.py
--data_path
=
./
$DATA_PATH
--device_target
=
"Ascend"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/lenet/scripts/run_standalone_eval_cpu.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../eval.py
--data_path
=
./
$DATA_PATH
--device_target
=
"CPU"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/lenet/scripts/run_standalone_eval_gpu.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../eval.py
--data_path
=
./
$DATA_PATH
--device_target
=
"GPU"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/lenet/scripts/run_standalone_train_ascend.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../train.py
--data_path
=
./
$DATA_PATH
--device_target
=
"Ascend"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
\ No newline at end of file
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/lenet/scripts/run_standalone_train_cpu.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../train.py
--data_path
=
./
$DATA_PATH
--device_target
=
"CPU"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/lenet/scripts/run_standalone_train_gpu.sh
0 → 100755
浏览文件 @
b5222937
#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# an simple tutorial as follows, more parameters can be setting
script_self
=
$(
readlink
-f
"
$0
"
)
self_path
=
$(
dirname
"
${
script_self
}
"
)
DATA_PATH
=
$1
CKPT_PATH
=
$2
python
-s
${
self_path
}
/../train.py
--data_path
=
./
$DATA_PATH
--device_target
=
"GPU"
--ckpt_path
=
./
$CKPT_PATH
>
log.txt 2>&1 &
This diff is collapsed.
Click to expand it.
model_zoo/official/cv/lenet/train.py
浏览文件 @
b5222937
...
...
@@ -36,6 +36,8 @@ if __name__ == "__main__":
help
=
'device where the code will be implemented (default: Ascend)'
)
parser
.
add_argument
(
'--data_path'
,
type
=
str
,
default
=
"./Data"
,
help
=
'path where the dataset is saved'
)
parser
.
add_argument
(
'--ckpt_path'
,
type
=
str
,
default
=
"./ckpt"
,
help
=
'if is test, must provide
\
path where the trained ckpt file'
)
parser
.
add_argument
(
'--dataset_sink_mode'
,
type
=
bool
,
default
=
True
,
help
=
'dataset_sink_mode is False or True'
)
args
=
parser
.
parse_args
()
...
...
@@ -53,7 +55,7 @@ if __name__ == "__main__":
time_cb
=
TimeMonitor
(
data_size
=
ds_train
.
get_dataset_size
())
config_ck
=
CheckpointConfig
(
save_checkpoint_steps
=
cfg
.
save_checkpoint_steps
,
keep_checkpoint_max
=
cfg
.
keep_checkpoint_max
)
ckpoint_cb
=
ModelCheckpoint
(
prefix
=
"checkpoint_lenet"
,
config
=
config_ck
)
ckpoint_cb
=
ModelCheckpoint
(
prefix
=
"checkpoint_lenet"
,
directory
=
args
.
ckpt_path
,
config
=
config_ck
)
model
=
Model
(
network
,
net_loss
,
net_opt
,
metrics
=
{
"Accuracy"
:
Accuracy
()})
print
(
"============== Starting Training =============="
)
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部