Update SessionTest.testFeedShapeCompatibility to work with C API enabled.
authorSkye Wanderman-Milne <skyewm@google.com>
Thu, 17 May 2018 16:22:24 +0000 (09:22 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 17 May 2018 16:25:06 +0000 (09:25 -0700)
commit8e9681486efc504b940683a4d0306c273e6179db
tree63b197cdc40f8740a7055fac7dcb98d8d1c2b5fc
parent9d3e17b333288f6e1f99f6c62f5469356b3429a6
Update SessionTest.testFeedShapeCompatibility to work with C API enabled.

This test got lost in the transition. Prior to enabling the C API,
some constant node whose values were used for shape inference would be
marked as unfeedable in tensor_util.constant_value
(https://github.com/tensorflow/tensorflow/blob/r1.8/tensorflow/python/framework/tensor_util.py#L810).

This shape inference path is no longer used with the C API enabled, so
the constant node is successfully fed, triggering a runtime shape error.

This is arguably a regression, but given that the Python code wouldn't
mark all nodes evaluated during shape inference as unfeedable, it
seems ok to relax the check a little more.

PiperOrigin-RevId: 197002741
tensorflow/python/client/session_test.py