Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
tensorflow
提交
1c1d6f54
T
tensorflow
项目概览
xxadev
/
tensorflow
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tensorflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1c1d6f54
编写于
3月 14, 2017
作者:
J
Justin Lebar
提交者:
TensorFlower Gardener
3月 14, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use or explicitly ignore tensorflow::Status objects.
Change: 150075644
上级
40d8721d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
18 deletion
+25
-18
tensorflow/contrib/cloud/kernels/bigquery_table_accessor_test.cc
...low/contrib/cloud/kernels/bigquery_table_accessor_test.cc
+2
-2
tensorflow/core/kernels/remote_fused_graph_execute_op_test.cc
...orflow/core/kernels/remote_fused_graph_execute_op_test.cc
+4
-3
tensorflow/core/kernels/remote_fused_graph_execute_utils.cc
tensorflow/core/kernels/remote_fused_graph_execute_utils.cc
+2
-1
tensorflow/core/kernels/remote_fused_graph_execute_utils_test.cc
...low/core/kernels/remote_fused_graph_execute_utils_test.cc
+17
-12
未找到文件。
tensorflow/contrib/cloud/kernels/bigquery_table_accessor_test.cc
浏览文件 @
1c1d6f54
...
...
@@ -469,7 +469,7 @@ TEST_F(BigQueryTableAccessorTest, SwitchingPartitionsTest) {
partition
.
set_start_index
(
3
);
partition
.
set_end_index
(
-
1
);
accessor_
->
SetPartition
(
partition
);
TF_EXPECT_OK
(
accessor_
->
SetPartition
(
partition
)
);
TF_EXPECT_OK
(
accessor_
->
ReadRow
(
&
row_id
,
&
example
));
EXPECT_EQ
(
3
,
row_id
);
EXPECT_TRUE
(
accessor_
->
Done
());
...
...
@@ -478,7 +478,7 @@ TEST_F(BigQueryTableAccessorTest, SwitchingPartitionsTest) {
partition
.
set_start_index
(
0
);
partition
.
set_end_index
(
1
);
accessor_
->
SetPartition
(
partition
);
TF_EXPECT_OK
(
accessor_
->
SetPartition
(
partition
)
);
TF_EXPECT_OK
(
accessor_
->
ReadRow
(
&
row_id
,
&
example
));
EXPECT_EQ
(
0
,
row_id
);
EXPECT_FALSE
(
accessor_
->
Done
());
...
...
tensorflow/core/kernels/remote_fused_graph_execute_op_test.cc
浏览文件 @
1c1d6f54
...
...
@@ -168,9 +168,10 @@ class TestRemoteFusedGraphExecutor final : public IRemoteFusedGraphExecutor {
// TODO(satok): Read NAME_B from node_a_plus_b
const
NodeDef
&
node_b
=
*
node_def_map_
.
at
(
NAME_B
);
const
TensorProto
*
proto
=
nullptr
;
GetNodeAttr
(
node_b
,
"value"
,
&
proto
);
TF_CHECK_OK
(
GetNodeAttr
(
node_b
,
"value"
,
&
proto
)
);
Tensor
const_tensor
;
RemoteFusedGraphExecuteUtils
::
MakeTensorFromProto
(
*
proto
,
&
const_tensor
);
TF_CHECK_OK
(
RemoteFusedGraphExecuteUtils
::
MakeTensorFromProto
(
*
proto
,
&
const_tensor
));
const
float
b_val
=
*
const_tensor
.
scalar
<
float
>
().
data
();
Tensor
output_a_plus_b
(
DT_FLOAT
,
{});
output_a_plus_b
.
flat
<
float
>
().
data
()[
0
]
=
input_val
+
b_val
;
...
...
@@ -258,7 +259,7 @@ TEST(RemoteFusedExecuteGraphOp, EndToEndTest) {
// 5.2 Fuse graph
GraphDef
fused_graph
;
RewriteGraphToFusedGraph
(
original_graph
,
&
fused_graph
);
TF_CHECK_OK
(
RewriteGraphToFusedGraph
(
original_graph
,
&
fused_graph
)
);
// 5.3 Setup session
std
::
vector
<
Tensor
>
output_tensors
;
...
...
tensorflow/core/kernels/remote_fused_graph_execute_utils.cc
浏览文件 @
1c1d6f54
...
...
@@ -269,7 +269,8 @@ RemoteFusedGraphExecuteUtils::AddOutputTensorShapeTypeByTensorShapeMap(
shape_inference
::
ShapeHandle
handle
;
status
=
context
->
MakeShapeFromTensorShape
(
input_node_info
.
second
.
shape
(),
&
handle
);
shape_refiner
->
SetShape
(
node
,
0
,
handle
);
// TODO(b/32704451): Don't just ignore this status!
shape_refiner
->
SetShape
(
node
,
0
,
handle
).
IgnoreError
();
is_input_node
=
true
;
}
if
(
!
status
.
ok
())
{
...
...
tensorflow/core/kernels/remote_fused_graph_execute_utils_test.cc
浏览文件 @
1c1d6f54
...
...
@@ -19,6 +19,7 @@ limitations under the License.
#include "tensorflow/core/common_runtime/shape_refiner.h"
#include "tensorflow/core/kernels/remote_fused_graph_execute_op_test_utils.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/platform/test.h"
namespace
tensorflow
{
...
...
@@ -188,34 +189,38 @@ TEST(RemoteFusedGraphExecuteUtils, PropagateAndBuildTensorShapeMap) {
{
NodeDef
*
node_def
=
GetNodeDef
(
NAME_B
,
&
def
);
RemoteFusedGraphExecuteUtils
::
AddOutputTensorShapeTypeByTensorShapeMap
(
tensor_shape_map
,
node_def
);
TF_ASSERT_OK
(
RemoteFusedGraphExecuteUtils
::
AddOutputTensorShapeTypeByTensorShapeMap
(
tensor_shape_map
,
node_def
));
std
::
vector
<
DataType
>
data_types
;
GetNodeAttr
(
*
node_def
,
RemoteFusedGraphExecuteUtils
::
ATTR_OUTPUT_DATA_TYPES
,
&
data_types
);
TF_ASSERT_OK
(
GetNodeAttr
(
*
node_def
,
RemoteFusedGraphExecuteUtils
::
ATTR_OUTPUT_DATA_TYPES
,
&
data_types
));
ASSERT_EQ
(
1
,
data_types
.
size
());
EXPECT_EQ
(
DT_FLOAT
,
data_types
.
at
(
0
));
std
::
vector
<
TensorShape
>
shapes
;
GetNodeAttr
(
*
node_def
,
RemoteFusedGraphExecuteUtils
::
ATTR_OUTPUT_SHAPES
,
&
shapes
);
TF_ASSERT_OK
(
GetNodeAttr
(
*
node_def
,
RemoteFusedGraphExecuteUtils
::
ATTR_OUTPUT_SHAPES
,
&
shapes
)
);
ASSERT_EQ
(
1
,
shapes
.
size
());
EXPECT_EQ
(
0
,
shapes
.
at
(
0
).
dims
());
}
{
NodeDef
*
node_def
=
GetNodeDef
(
NAME_A_PLUS_B
,
&
def
);
RemoteFusedGraphExecuteUtils
::
AddOutputTensorShapeTypeByTensorShapeMap
(
tensor_shape_map
,
node_def
);
TF_ASSERT_OK
(
RemoteFusedGraphExecuteUtils
::
AddOutputTensorShapeTypeByTensorShapeMap
(
tensor_shape_map
,
node_def
));
std
::
vector
<
DataType
>
data_types
;
GetNodeAttr
(
*
node_def
,
RemoteFusedGraphExecuteUtils
::
ATTR_OUTPUT_DATA_TYPES
,
&
data_types
);
TF_ASSERT_OK
(
GetNodeAttr
(
*
node_def
,
RemoteFusedGraphExecuteUtils
::
ATTR_OUTPUT_DATA_TYPES
,
&
data_types
));
ASSERT_EQ
(
1
,
data_types
.
size
());
EXPECT_EQ
(
DT_FLOAT
,
data_types
.
at
(
0
));
std
::
vector
<
TensorShape
>
shapes
;
GetNodeAttr
(
*
node_def
,
RemoteFusedGraphExecuteUtils
::
ATTR_OUTPUT_SHAPES
,
&
shapes
);
TF_ASSERT_OK
(
GetNodeAttr
(
*
node_def
,
RemoteFusedGraphExecuteUtils
::
ATTR_OUTPUT_SHAPES
,
&
shapes
)
);
ASSERT_EQ
(
1
,
shapes
.
size
());
EXPECT_EQ
(
0
,
shapes
.
at
(
0
).
dims
());
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录