aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/ops/image_ops_test.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-08-30 12:24:42 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-08-30 13:33:09 -0700
commit660d7e5ae51d8d74643874b9ae10f855dced69bb (patch)
treeec62bdb867b4c09a8a458f94911dc96387973e95 /tensorflow/core/ops/image_ops_test.cc
parent5532f08194c2e29e6056e5339cbd57c52db1907a (diff)
Delegate to C++ shape inference functions for several ops in
image_ops, tensor_array_ops, sparse_ops, and string_ops. Fix bugs in C++ shape inference for image decoding (channel 0 means auto-detect) and string split (some output dims are known). Change: 131747517
Diffstat (limited to 'tensorflow/core/ops/image_ops_test.cc')
-rw-r--r--tensorflow/core/ops/image_ops_test.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/core/ops/image_ops_test.cc b/tensorflow/core/ops/image_ops_test.cc
index 1b5db82ab8..d9f1400a2c 100644
--- a/tensorflow/core/ops/image_ops_test.cc
+++ b/tensorflow/core/ops/image_ops_test.cc
@@ -58,7 +58,10 @@ TEST(ImageOpsTest, DecodeImage_ShapeFn) {
// Rank check.
INFER_ERROR("Shape must be rank 0 but is rank 1", op, "[1]");
- // Channel not set - output is unknown.
+ // Set the channel to zero - output is not known.
+ TF_ASSERT_OK(NodeDefBuilder("test", op_name)
+ .Input({"a", 0, DT_STRING})
+ .Finalize(&op.node_def));
INFER_OK(op, "[]", "[?,?,?]");
// Set the channel and so that part of output shape is known.