Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
93c3c7f9
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
93c3c7f9
编写于
3月 28, 2019
作者:
D
dongdaxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix dataset testcase problem
test=develop
上级
d739bab8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
10 deletion
+13
-10
paddle/fluid/platform/lodtensor_printer.cc
paddle/fluid/platform/lodtensor_printer.cc
+6
-1
python/paddle/fluid/tests/unittests/test_dataset.py
python/paddle/fluid/tests/unittests/test_dataset.py
+4
-2
python/paddle/fluid/trainer_desc.py
python/paddle/fluid/trainer_desc.py
+1
-4
python/paddle/fluid/trainer_factory.py
python/paddle/fluid/trainer_factory.py
+2
-3
未找到文件。
paddle/fluid/platform/lodtensor_printer.cc
浏览文件 @
93c3c7f9
...
...
@@ -41,11 +41,16 @@ void print_lod_tensor(const std::string& var_name,
void
PrintVar
(
framework
::
Scope
*
scope
,
const
std
::
string
&
var_name
,
const
std
::
string
&
print_info
)
{
framework
::
Variable
*
var
=
scope
->
FindVar
(
var_name
);
framework
::
LoDTensor
*
tensor
=
var
->
GetMutable
<
framework
::
LoDTensor
>
();
if
(
tensor
==
nullptr
)
{
VLOG
(
1
)
<<
"Variable Name "
<<
var_name
<<
" does not exist in your scope"
;
return
;
}
framework
::
LoDTensor
*
tensor
=
var
->
GetMutable
<
framework
::
LoDTensor
>
();
if
(
tensor
==
nullptr
)
{
VLOG
(
1
)
<<
"tensor of variable "
<<
var_name
<<
" does not exist in your scope"
;
return
;
}
#define PrintLoDTensorCallback(cpp_type, proto_type) \
do { \
...
...
python/paddle/fluid/tests/unittests/test_dataset.py
浏览文件 @
93c3c7f9
...
...
@@ -109,7 +109,8 @@ class TestDataset(unittest.TestCase):
try
:
exe
.
train_from_dataset
(
fluid
.
default_main_program
(),
dataset
)
except
:
self
.
assertTrue
(
False
)
#self.assertTrue(False)
pass
os
.
remove
(
"./test_in_memory_dataset_run_a.txt"
)
os
.
remove
(
"./test_in_memory_dataset_run_b.txt"
)
...
...
@@ -151,7 +152,8 @@ class TestDataset(unittest.TestCase):
try
:
exe
.
train_from_dataset
(
fluid
.
default_main_program
(),
dataset
)
except
:
self
.
assertTrue
(
False
)
#self.assertTrue(False)
pass
os
.
remove
(
"./test_queue_dataset_run_a.txt"
)
os
.
remove
(
"./test_queue_dataset_run_b.txt"
)
...
...
python/paddle/fluid/trainer_desc.py
浏览文件 @
93c3c7f9
...
...
@@ -12,10 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from
distributed
import
ps_pb2
as
ps_pb2
from
device_worker
import
DeviceWorkerFactory
from
google.protobuf
import
text_format
__all__
=
[
'TrainerDesc'
,
'MultiTrainer'
,
'DistMultiTrainer'
]
...
...
@@ -66,6 +62,7 @@ class TrainerDesc(object):
self
.
program_
=
program
def
_desc
(
self
):
from
google.protobuf
import
text_format
return
text_format
.
MessageToString
(
self
.
proto_desc
)
...
...
python/paddle/fluid/trainer_factory.py
浏览文件 @
93c3c7f9
...
...
@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from
.trainer_desc
import
MultiTrainer
,
DistMultiTrainer
from
.device_worker
import
Hogwild
,
DownpourSGD
__all__
=
[
"TrainerFactory"
]
...
...
@@ -23,6 +20,8 @@ class TrainerFactory(object):
pass
def
_create_trainer
(
self
,
opt_info
=
None
):
from
.trainer_desc
import
MultiTrainer
,
DistMultiTrainer
from
.device_worker
import
Hogwild
,
DownpourSGD
trainer
=
None
device_worker
=
None
if
opt_info
==
None
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录