Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
d25389fe
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d25389fe
编写于
3月 14, 2019
作者:
X
xujiaqi01
提交者:
dongdaxiang
3月 29, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add some log && fix error
上级
fd3adf58
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
18 addition
and
12 deletion
+18
-12
paddle/fluid/framework/data_feed.cc
paddle/fluid/framework/data_feed.cc
+13
-5
paddle/fluid/framework/data_set.cc
paddle/fluid/framework/data_set.cc
+0
-1
paddle/fluid/framework/data_set.h
paddle/fluid/framework/data_set.h
+0
-4
paddle/fluid/framework/executor.cc
paddle/fluid/framework/executor.cc
+1
-1
paddle/fluid/framework/executor.h
paddle/fluid/framework/executor.h
+1
-1
paddle/fluid/framework/fleet/fleet_wrapper.cc
paddle/fluid/framework/fleet/fleet_wrapper.cc
+3
-0
未找到文件。
paddle/fluid/framework/data_feed.cc
浏览文件 @
d25389fe
...
@@ -177,6 +177,9 @@ int InMemoryDataFeed<T>::Next() {
...
@@ -177,6 +177,9 @@ int InMemoryDataFeed<T>::Next() {
}
}
CHECK
(
in_channel
!=
nullptr
);
CHECK
(
in_channel
!=
nullptr
);
CHECK
(
out_channel
!=
nullptr
);
CHECK
(
out_channel
!=
nullptr
);
VLOG
(
3
)
<<
"in_channel size="
<<
in_channel
->
Size
()
<<
", out_channel size="
<<
out_channel
->
Size
()
<<
", thread_id="
<<
thread_id_
;
int
index
=
0
;
int
index
=
0
;
T
instance
;
T
instance
;
T
ins_vec
;
T
ins_vec
;
...
@@ -259,14 +262,19 @@ void InMemoryDataFeed<T>::FillChannelToMemoryData() {
...
@@ -259,14 +262,19 @@ void InMemoryDataFeed<T>::FillChannelToMemoryData() {
channel
=
shuffled_ins_out_
;
channel
=
shuffled_ins_out_
;
}
}
CHECK
(
channel
!=
nullptr
);
CHECK
(
channel
!=
nullptr
);
local_vec
.
res
erv
e
(
channel
->
Size
());
local_vec
.
res
iz
e
(
channel
->
Size
());
for
(
int64_t
i
=
0
;
i
<
channel
->
Size
();
++
i
)
{
for
(
int64_t
i
=
0
;
i
<
channel
->
Size
();
++
i
)
{
channel
->
Pop
(
local_vec
[
i
]);
channel
->
Pop
(
local_vec
[
i
]);
}
}
std
::
unique_lock
<
std
::
mutex
>
lock
(
*
mutex_for_update_memory_data_
);
VLOG
(
3
)
<<
"local_vec size="
<<
local_vec
.
size
()
<<
", thread_id="
<<
thread_id_
;
lock
.
lock
();
{
memory_data_
->
insert
(
memory_data_
->
end
(),
local_vec
.
begin
(),
local_vec
.
end
());
std
::
lock_guard
<
std
::
mutex
>
g
(
*
mutex_for_update_memory_data_
);
lock
.
unlock
();
VLOG
(
3
)
<<
"before insert, memory_data_ size="
<<
memory_data_
->
size
()
<<
", thread_id="
<<
thread_id_
;
memory_data_
->
insert
(
memory_data_
->
end
(),
local_vec
.
begin
(),
local_vec
.
end
());
VLOG
(
3
)
<<
"after insert memory_data_ size="
<<
memory_data_
->
size
()
<<
", thread_id="
<<
thread_id_
;
}
std
::
vector
<
T
>
().
swap
(
local_vec
);
std
::
vector
<
T
>
().
swap
(
local_vec
);
}
}
...
...
paddle/fluid/framework/data_set.cc
浏览文件 @
d25389fe
...
@@ -176,7 +176,6 @@ void DatasetImpl<T>::DestroyReaders() {
...
@@ -176,7 +176,6 @@ void DatasetImpl<T>::DestroyReaders() {
for
(
std
::
thread
&
t
:
fill_threads
)
{
for
(
std
::
thread
&
t
:
fill_threads
)
{
t
.
join
();
t
.
join
();
}
}
std
::
vector
<
std
::
string
>
().
swap
(
filelist_
);
std
::
vector
<
std
::
shared_ptr
<
paddle
::
framework
::
DataFeed
>>
().
swap
(
readers_
);
std
::
vector
<
std
::
shared_ptr
<
paddle
::
framework
::
DataFeed
>>
().
swap
(
readers_
);
}
}
...
...
paddle/fluid/framework/data_set.h
浏览文件 @
d25389fe
...
@@ -83,10 +83,6 @@ class DatasetImpl : public Dataset {
...
@@ -83,10 +83,6 @@ class DatasetImpl : public Dataset {
std
::
vector
<
std
::
shared_ptr
<
paddle
::
framework
::
DataFeed
>>
readers_
;
std
::
vector
<
std
::
shared_ptr
<
paddle
::
framework
::
DataFeed
>>
readers_
;
std
::
vector
<
T
>
memory_data_
;
std
::
vector
<
T
>
memory_data_
;
std
::
mutex
mutex_for_update_memory_data_
;
std
::
mutex
mutex_for_update_memory_data_
;
std
::
vector
<
std
::
shared_ptr
<
paddle
::
framework
::
BlockingQueue
<
T
>>>
shuffled_ins_vec_
;
std
::
vector
<
std
::
shared_ptr
<
paddle
::
framework
::
BlockingQueue
<
T
>>>
shuffled_ins_out_vec_
;
int
thread_num_
;
int
thread_num_
;
paddle
::
framework
::
DataFeedDesc
data_feed_desc_
;
paddle
::
framework
::
DataFeedDesc
data_feed_desc_
;
std
::
vector
<
std
::
string
>
filelist_
;
std
::
vector
<
std
::
string
>
filelist_
;
...
...
paddle/fluid/framework/executor.cc
浏览文件 @
d25389fe
...
@@ -118,7 +118,7 @@ void Executor::CreateVariables(const ProgramDesc& pdesc, Scope* scope,
...
@@ -118,7 +118,7 @@ void Executor::CreateVariables(const ProgramDesc& pdesc, Scope* scope,
}
}
void
Executor
::
RunFromDataset
(
const
ProgramDesc
&
main_program
,
Scope
*
scope
,
void
Executor
::
RunFromDataset
(
const
ProgramDesc
&
main_program
,
Scope
*
scope
,
MultiSlot
Dataset
*
dataset
,
Dataset
*
dataset
,
const
std
::
string
&
trainer_desc_str
)
{
const
std
::
string
&
trainer_desc_str
)
{
VLOG
(
3
)
<<
"Start to RunFromDataset in executor"
;
VLOG
(
3
)
<<
"Start to RunFromDataset in executor"
;
TrainerDesc
trainer_desc
;
TrainerDesc
trainer_desc
;
...
...
paddle/fluid/framework/executor.h
浏览文件 @
d25389fe
...
@@ -113,7 +113,7 @@ class Executor {
...
@@ -113,7 +113,7 @@ class Executor {
void
EnableMKLDNN
(
const
ProgramDesc
&
program
);
void
EnableMKLDNN
(
const
ProgramDesc
&
program
);
void
RunFromDataset
(
const
ProgramDesc
&
main_program
,
Scope
*
scope
,
void
RunFromDataset
(
const
ProgramDesc
&
main_program
,
Scope
*
scope
,
MultiSlot
Dataset
*
dataset
,
Dataset
*
dataset
,
const
std
::
string
&
trainer_desc_str
);
const
std
::
string
&
trainer_desc_str
);
private:
private:
...
...
paddle/fluid/framework/fleet/fleet_wrapper.cc
浏览文件 @
d25389fe
...
@@ -297,6 +297,9 @@ void FleetWrapper::PushSparseVarsWithLabelAsync(
...
@@ -297,6 +297,9 @@ void FleetWrapper::PushSparseVarsWithLabelAsync(
int
FleetWrapper
::
RegisterClientToClientMsgHandler
(
int
FleetWrapper
::
RegisterClientToClientMsgHandler
(
int
msg_type
,
MsgHandlerFunc
handler
)
{
int
msg_type
,
MsgHandlerFunc
handler
)
{
#ifdef PADDLE_WITH_PSLIB
#ifdef PADDLE_WITH_PSLIB
VLOG
(
3
)
<<
"calling FleetWrapper::RegisterClientToClientMsgHandler"
;
VLOG
(
3
)
<<
"pslib_ptr_="
<<
pslib_ptr_
;
VLOG
(
3
)
<<
"_worker_ptr="
<<
pslib_ptr_
->
_worker_ptr
;
pslib_ptr_
->
_worker_ptr
->
registe_client2client_msg_handler
(
pslib_ptr_
->
_worker_ptr
->
registe_client2client_msg_handler
(
msg_type
,
handler
);
msg_type
,
handler
);
#else
#else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录