Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PALM
提交
88d1ed62
P
PALM
项目概览
PaddlePaddle
/
PALM
通知
8
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PALM
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
88d1ed62
编写于
10月 23, 2019
作者:
X
Xiaoyao Xi
提交者:
GitHub
10月 23, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #11 from xixiaoyao/master
fix bugs
上级
457e0078
dc1c43e8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
9 deletion
+7
-9
paddlepalm/mtl_controller.py
paddlepalm/mtl_controller.py
+2
-1
paddlepalm/utils/reader_helper.py
paddlepalm/utils/reader_helper.py
+3
-2
run_demo1.sh
run_demo1.sh
+1
-3
run_demo2.sh
run_demo2.sh
+1
-3
未找到文件。
paddlepalm/mtl_controller.py
浏览文件 @
88d1ed62
...
...
@@ -626,7 +626,8 @@ class Controller(object):
rt_outputs
=
self
.
exe
.
run
(
train_program
,
fetch_list
=
fetch_list
)
rt_outputs
=
{
k
:
v
for
k
,
v
in
zip
(
fetch_names
,
rt_outputs
)}
rt_task_id
=
np
.
squeeze
(
rt_outputs
[
'__task_id'
]).
tolist
()
assert
(
not
isinstance
(
rt_task_id
,
list
))
or
len
(
set
(
rt_task_id
))
==
1
,
rt_task_id
# 注意注释掉这一行之后,训练日志实际是错误的
# assert (not isinstance(rt_task_id, list)) or len(set(rt_task_id)) == 1, rt_task_id
rt_task_id
=
rt_task_id
[
0
]
if
isinstance
(
rt_task_id
,
list
)
else
rt_task_id
cur_task
=
instances
[
rt_task_id
]
...
...
paddlepalm/utils/reader_helper.py
浏览文件 @
88d1ed62
...
...
@@ -72,7 +72,8 @@ def create_net_inputs(input_attrs, async=False, iterator_fn=None, dev_count=1, n
if
async
:
assert
iterator_fn
is
not
None
,
"iterator_fn is needed for building async input layer."
reader
=
fluid
.
io
.
PyReader
(
inputs
,
capacity
=
dev_count
*
n_prefetch
,
iterable
=
False
)
# reader = fluid.io.PyReader(inputs, capacity=dev_count*n_prefetch, iterable=False)
reader
=
fluid
.
io
.
PyReader
(
inputs
,
capacity
=
dev_count
,
iterable
=
False
)
reader
.
decorate_batch_generator
(
iterator_fn
)
reader
.
start
()
...
...
@@ -153,7 +154,7 @@ def create_joint_iterator_fn(iterators, iterator_prefixes, joint_shape_and_dtype
for
i
in
range
(
dev_count
):
# results = _zero_batch(joint_shape_and_dtypes, batch_size=batch_size)
#
results[0] = task_id_tensor
results
[
0
]
=
task_id_tensor
if
id
in
outbuf
:
outputs
=
outbuf
[
id
]
del
outbuf
[
id
]
...
...
run_demo1.sh
浏览文件 @
88d1ed62
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
export
FLAGS_fraction_of_gpu_memory_to_use
=
0.1
export
FLAGS_eager_delete_tensor_gb
=
0
export
CUDA_VISIBLE_DEVICES
=
0
python demo1.py
run_demo2.sh
浏览文件 @
88d1ed62
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3,4,5,6,7
export
FLAGS_fraction_of_gpu_memory_to_use
=
0.1
export
FLAGS_eager_delete_tensor_gb
=
0
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
python demo2.py
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录