Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
0a0021f3
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看板
未验证
提交
0a0021f3
编写于
4月 23, 2019
作者:
Y
Yibing Liu
提交者:
GitHub
4月 23, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix more core.xxx usages (#2134)
上级
550a0e2e
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
13 addition
and
18 deletion
+13
-18
PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/main.py
...P/dialogue_model_toolkit/auto_dialogue_evaluation/main.py
+2
-2
PaddleNLP/language_model/train.py
PaddleNLP/language_model/train.py
+1
-2
PaddleNLP/neural_machine_translation/transformer/infer.py
PaddleNLP/neural_machine_translation/transformer/infer.py
+1
-1
PaddleNLP/preprocess/tokenizer/tokenizer.py
PaddleNLP/preprocess/tokenizer/tokenizer.py
+1
-1
PaddleNLP/unarchived/chinese_ner/infer.py
PaddleNLP/unarchived/chinese_ner/infer.py
+1
-1
PaddleNLP/unarchived/language_model/gru/infer.py
PaddleNLP/unarchived/language_model/gru/infer.py
+1
-1
PaddleNLP/unarchived/language_model/lstm/train.py
PaddleNLP/unarchived/language_model/lstm/train.py
+1
-2
PaddleNLP/unarchived/machine_reading_comprehension/run.py
PaddleNLP/unarchived/machine_reading_comprehension/run.py
+1
-2
PaddleNLP/unarchived/neural_machine_translation/rnn_search/infer.py
...unarchived/neural_machine_translation/rnn_search/infer.py
+1
-2
PaddleNLP/unarchived/neural_machine_translation/rnn_search/train.py
...unarchived/neural_machine_translation/rnn_search/train.py
+1
-2
PaddleNLP/unarchived/sequence_tagging_for_ner/infer.py
PaddleNLP/unarchived/sequence_tagging_for_ner/infer.py
+1
-1
PaddleNLP/unarchived/text_classification/clouds/scdb_parallel_executor.py
...ived/text_classification/clouds/scdb_parallel_executor.py
+1
-1
未找到文件。
PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/main.py
浏览文件 @
0a0021f3
...
...
@@ -352,7 +352,7 @@ def evaluate(args):
t0
=
time
.
time
()
with
fluid
.
scope_guard
(
fluid
.
core
.
Scope
()):
with
fluid
.
scope_guard
(
fluid
.
Scope
()):
infer_program
,
feed_target_names
,
fetch_vars
=
fluid
.
io
.
load_inference_model
(
args
.
init_model
,
exe
)
...
...
@@ -402,7 +402,7 @@ def infer(args):
t0
=
time
.
time
()
with
fluid
.
scope_guard
(
fluid
.
core
.
Scope
()):
with
fluid
.
scope_guard
(
fluid
.
Scope
()):
infer_program
,
feed_target_names
,
fetch_vars
=
fluid
.
io
.
load_inference_model
(
args
.
init_model
,
exe
)
...
...
PaddleNLP/language_model/train.py
浏览文件 @
0a0021f3
...
...
@@ -25,7 +25,6 @@ import math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.framework
as
framework
from
paddle.fluid.executor
import
Executor
...
...
@@ -179,7 +178,7 @@ def train():
optimizer
.
minimize
(
loss
)
place
=
core
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
core
.
CPUPlace
()
place
=
fluid
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
fluid
.
CPUPlace
()
exe
=
Executor
(
place
)
exe
.
run
(
framework
.
default_startup_program
())
...
...
PaddleNLP/neural_machine_translation/transformer/infer.py
浏览文件 @
0a0021f3
...
...
@@ -285,7 +285,7 @@ def fast_infer(args):
seq_ids_list
,
seq_scores_list
=
[
seq_ids
],
[
seq_scores
]
if
isinstance
(
seq_ids
,
paddle
.
fluid
.
core
.
LoDTensor
)
else
(
seq_ids
,
seq_scores
)
seq_ids
,
paddle
.
fluid
.
LoDTensor
)
else
(
seq_ids
,
seq_scores
)
for
seq_ids
,
seq_scores
in
zip
(
seq_ids_list
,
seq_scores_list
):
# How to parse the results:
# Suppose the lod of seq_ids is:
...
...
PaddleNLP/preprocess/tokenizer/tokenizer.py
浏览文件 @
0a0021f3
...
...
@@ -119,7 +119,7 @@ def infer(args):
#place = fluid.CUDAPlace(0)
exe
=
fluid
.
Executor
(
place
)
#print("aaa")
inference_scope
=
fluid
.
core
.
Scope
()
inference_scope
=
fluid
.
Scope
()
with
fluid
.
scope_guard
(
inference_scope
):
[
inference_program
,
feed_target_names
,
fetch_targets
]
=
fluid
.
io
.
load_inference_model
(
args
.
model_path
,
exe
)
...
...
PaddleNLP/unarchived/chinese_ner/infer.py
浏览文件 @
0a0021f3
...
...
@@ -92,7 +92,7 @@ def infer(args):
feeder
=
fluid
.
DataFeeder
(
feed_list
=
[
word
,
mention
,
target
],
place
=
place
)
exe
=
fluid
.
Executor
(
place
)
inference_scope
=
fluid
.
core
.
Scope
()
inference_scope
=
fluid
.
Scope
()
with
fluid
.
scope_guard
(
inference_scope
):
[
inference_program
,
feed_target_names
,
fetch_targets
]
=
fluid
.
io
.
load_inference_model
(
args
.
model_path
,
exe
)
...
...
PaddleNLP/unarchived/language_model/gru/infer.py
浏览文件 @
0a0021f3
...
...
@@ -17,7 +17,7 @@ def infer(test_reader, use_cuda, model_path):
place
=
fluid
.
CUDAPlace
(
0
)
if
use_cuda
else
fluid
.
CPUPlace
()
exe
=
fluid
.
Executor
(
place
)
with
fluid
.
scope_guard
(
fluid
.
core
.
Scope
()):
with
fluid
.
scope_guard
(
fluid
.
Scope
()):
infer_program
,
feed_target_names
,
fetch_vars
=
fluid
.
io
.
load_inference_model
(
model_path
,
exe
)
...
...
PaddleNLP/unarchived/language_model/lstm/train.py
浏览文件 @
0a0021f3
...
...
@@ -25,7 +25,6 @@ import math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.framework
as
framework
from
paddle.fluid.executor
import
Executor
...
...
@@ -178,7 +177,7 @@ def train():
optimizer
.
minimize
(
loss
)
place
=
core
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
core
.
CPUPlace
()
place
=
fluid
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
fluid
.
CPUPlace
()
exe
=
Executor
(
place
)
exe
.
run
(
framework
.
default_startup_program
())
...
...
PaddleNLP/unarchived/machine_reading_comprehension/run.py
浏览文件 @
0a0021f3
...
...
@@ -26,7 +26,6 @@ import multiprocessing
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.framework
as
framework
from
paddle.fluid.executor
import
Executor
...
...
@@ -389,7 +388,7 @@ def train(logger, args):
optimizer
.
minimize
(
obj_func
)
# initialize parameters
place
=
core
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
core
.
CPUPlace
()
place
=
fluid
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
fluid
.
CPUPlace
()
exe
=
Executor
(
place
)
if
args
.
load_dir
:
logger
.
info
(
'load from {}'
.
format
(
args
.
load_dir
))
...
...
PaddleNLP/unarchived/neural_machine_translation/rnn_search/infer.py
浏览文件 @
0a0021f3
...
...
@@ -22,7 +22,6 @@ import six
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.framework
as
framework
from
paddle.fluid.executor
import
Executor
from
paddle.fluid.contrib.decoder.beam_search_decoder
import
*
...
...
@@ -65,7 +64,7 @@ def infer():
batch_size
=
args
.
batch_size
,
drop_last
=
False
)
place
=
core
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
core
.
CPUPlace
()
place
=
fluid
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
fluid
.
CPUPlace
()
exe
=
Executor
(
place
)
exe
.
run
(
framework
.
default_startup_program
())
...
...
PaddleNLP/unarchived/neural_machine_translation/rnn_search/train.py
浏览文件 @
0a0021f3
...
...
@@ -22,7 +22,6 @@ import os
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.framework
as
framework
from
paddle.fluid.executor
import
Executor
from
paddle.fluid.contrib.decoder.beam_search_decoder
import
*
...
...
@@ -95,7 +94,7 @@ def train():
batch_size
=
args
.
batch_size
,
drop_last
=
False
)
place
=
core
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
core
.
CPUPlace
()
place
=
fluid
.
CUDAPlace
(
0
)
if
args
.
use_gpu
else
fluid
.
CPUPlace
()
exe
=
Executor
(
place
)
exe
.
run
(
framework
.
default_startup_program
())
...
...
PaddleNLP/unarchived/sequence_tagging_for_ner/infer.py
浏览文件 @
0a0021f3
...
...
@@ -31,7 +31,7 @@ def infer(model_path, batch_size, test_data_file, vocab_file, target_file,
place
=
fluid
.
CUDAPlace
(
0
)
if
use_gpu
else
fluid
.
CPUPlace
()
exe
=
fluid
.
Executor
(
place
)
inference_scope
=
fluid
.
core
.
Scope
()
inference_scope
=
fluid
.
Scope
()
with
fluid
.
scope_guard
(
inference_scope
):
[
inference_program
,
feed_target_names
,
fetch_targets
]
=
fluid
.
io
.
load_inference_model
(
model_path
,
exe
)
...
...
PaddleNLP/unarchived/text_classification/clouds/scdb_parallel_executor.py
浏览文件 @
0a0021f3
...
...
@@ -348,7 +348,7 @@ def infer(test_reader, use_cuda, model_path=None):
place
=
fluid
.
CPUPlace
()
exe
=
fluid
.
Executor
(
place
)
inference_scope
=
fluid
.
core
.
Scope
()
inference_scope
=
fluid
.
Scope
()
with
fluid
.
scope_guard
(
inference_scope
):
[
inference_program
,
feed_target_names
,
fetch_targets
]
=
fluid
.
io
.
load_inference_model
(
model_path
,
exe
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录