Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
c443f9b8
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c443f9b8
编写于
8月 09, 2018
作者:
Y
Yibing Liu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of upstream into sequence_tagging_for_ner_ce
上级
2e7f71d9
5efb3d3d
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
6 addition
and
6 deletion
+6
-6
fluid/language_model/train.py
fluid/language_model/train.py
+1
-1
fluid/text_classification/infer.py
fluid/text_classification/infer.py
+1
-1
fluid/text_classification/train.py
fluid/text_classification/train.py
+3
-3
fluid/text_classification/utils.py
fluid/text_classification/utils.py
+1
-1
未找到文件。
fluid/language_model/train.py
浏览文件 @
c443f9b8
...
...
@@ -145,7 +145,7 @@ def train(train_reader,
if
pass_idx
==
pass_num
-
1
and
args
.
enable_ce
:
#Note: The following logs are special for CE monitoring.
#Other situations do not need to care about these logs.
gpu_num
=
get_cards
()
gpu_num
=
get_cards
(
args
.
enable_ce
)
if
gpu_num
==
1
:
print
(
"kpis imikolov_20_pass_duration %s"
%
(
total_time
/
epoch_idx
))
...
...
fluid/text_classification/infer.py
浏览文件 @
c443f9b8
...
...
@@ -4,8 +4,8 @@ import unittest
import
contextlib
import
numpy
as
np
import
paddle
import
paddle.fluid
as
fluid
import
paddle.v2
as
paddle
import
utils
...
...
fluid/text_classification/train.py
浏览文件 @
c443f9b8
...
...
@@ -4,8 +4,8 @@ import time
import
unittest
import
contextlib
import
paddle
import
paddle.fluid
as
fluid
import
paddle.v2
as
paddle
import
utils
from
nets
import
bow_net
...
...
@@ -55,7 +55,7 @@ def train(train_reader,
feeder
=
fluid
.
DataFeeder
(
feed_list
=
[
data
,
label
],
place
=
place
)
# For internal continuous evaluation
if
'CE_MODE_X'
in
os
.
environ
:
if
"CE_MODE_X"
in
os
.
environ
:
fluid
.
default_startup_program
().
random_seed
=
110
exe
.
run
(
fluid
.
default_startup_program
())
for
pass_id
in
xrange
(
pass_num
):
...
...
@@ -80,7 +80,7 @@ def train(train_reader,
pass_end
=
time
.
time
()
# For internal continuous evaluation
if
'CE_MODE_X'
in
os
.
environ
:
if
"CE_MODE_X"
in
os
.
environ
:
print
(
"kpis train_acc %f"
%
avg_acc
)
print
(
"kpis train_cost %f"
%
avg_cost
)
print
(
"kpis train_duration %f"
%
(
pass_end
-
pass_start
))
...
...
fluid/text_classification/utils.py
浏览文件 @
c443f9b8
...
...
@@ -65,7 +65,7 @@ def prepare_data(data_type="imdb",
raise
RuntimeError
(
"No such dataset"
)
if
data_type
==
"imdb"
:
if
'CE_MODE_X'
in
os
.
environ
:
if
"CE_MODE_X"
in
os
.
environ
:
train_reader
=
paddle
.
batch
(
paddle
.
dataset
.
imdb
.
train
(
word_dict
),
batch_size
=
batch_size
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录