framework/ops.py: Stricter check for use of the C API for graph construction.
authorAsim Shankar <ashankar@google.com>
Wed, 21 Feb 2018 20:31:27 +0000 (12:31 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Wed, 21 Feb 2018 20:35:40 +0000 (12:35 -0800)
commit80e100b4fb98f47e8e843762651530741c1d66bb
tree7d71a4b057d0e213727c4e60e0129bd73577e315
parent91213cf9e3d7ded171c6c46fdb95521b40b8c4b9
framework/ops.py: Stricter check for use of the C API for graph construction.

Fixes #16913

Didn't add an explicit test for this since arguably use of the C API for graph
construction will soon become the default, so I figured testing that
tfe.defun's use of _use_c_api_hack() would only add code that should be deleted
soon.

PiperOrigin-RevId: 186502140
tensorflow/python/framework/ops.py