Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
75719fea
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 2 年 前同步成功
通知
210
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
75719fea
编写于
8月 14, 2017
作者:
X
Xinghai Sun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix an incorrect usage of is_local argument.
上级
c767f201
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
7 deletion
+9
-7
cloud/pcloud_submit.sh
cloud/pcloud_submit.sh
+1
-1
model.py
model.py
+5
-1
train.py
train.py
+3
-5
未找到文件。
cloud/pcloud_submit.sh
浏览文件 @
75719fea
...
...
@@ -7,7 +7,7 @@ MEAN_STD_FILE="../mean_std.npz"
CLOUD_DATA_DIR
=
"/pfs/dlnel/home/sunxinghai@baidu.com/deepspeech2/data"
CLOUD_MODEL_DIR
=
"/pfs/dlnel/home/sunxinghai@baidu.com/deepspeech2/model"
# Configure cloud resources
NUM_CPU
=
12
NUM_CPU
=
8
NUM_GPU
=
8
NUM_NODE
=
1
MEMORY
=
"10Gi"
...
...
model.py
浏览文件 @
75719fea
...
...
@@ -46,6 +46,7 @@ class DeepSpeech2Model(object):
gradient_clipping
,
num_passes
,
output_model_dir
,
is_local
=
True
,
num_iterations_print
=
100
):
"""Train the model.
...
...
@@ -65,6 +66,8 @@ class DeepSpeech2Model(object):
:param num_iterations_print: Number of training iterations for printing
a training loss.
:type rnn_iteratons_print: int
:param is_local: Set to False if running with pserver with multi-nodes.
:type is_local: bool
:param output_model_dir: Directory for saving the model (every pass).
:type output_model_dir: basestring
"""
...
...
@@ -79,7 +82,8 @@ class DeepSpeech2Model(object):
trainer
=
paddle
.
trainer
.
SGD
(
cost
=
self
.
_loss
,
parameters
=
self
.
_parameters
,
update_equation
=
optimizer
)
update_equation
=
optimizer
,
is_local
=
is_local
)
# create event handler
def
event_handler
(
event
):
...
...
train.py
浏览文件 @
75719fea
...
...
@@ -179,15 +179,13 @@ def train():
gradient_clipping
=
400
,
num_passes
=
args
.
num_passes
,
num_iterations_print
=
args
.
num_iterations_print
,
output_model_dir
=
args
.
output_model_dir
)
output_model_dir
=
args
.
output_model_dir
,
is_local
=
args
.
is_local
)
def
main
():
utils
.
print_arguments
(
args
)
paddle
.
init
(
use_gpu
=
args
.
use_gpu
,
trainer_count
=
args
.
trainer_count
,
is_local
=
args
.
is_local
)
paddle
.
init
(
use_gpu
=
args
.
use_gpu
,
trainer_count
=
args
.
trainer_count
)
train
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录