[TF Ops] Bugfix to Operation initializer: error message uses node_def.
authorEugene Brevdo <ebrevdo@google.com>
Tue, 6 Feb 2018 22:37:21 +0000 (14:37 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 6 Feb 2018 22:41:23 +0000 (14:41 -0800)
self.node_def may not yet be accessible when using the C api.

PiperOrigin-RevId: 184742074

tensorflow/python/framework/ops.py

index 1fdaf96..4d7dcdb 100644 (file)
@@ -1618,7 +1618,7 @@ class Operation(object):
           for i, x in zip(inputs, input_types)):
         raise TypeError("In op '%s', input types (%s) are not compatible "
                         "with expected types (%s)" %
-                        (self.node_def.name, [i.dtype for i in inputs],
+                        (node_def.name, [i.dtype for i in inputs],
                          input_types))
 
     # Build the list of control inputs.