[eager]: Correctly handle operation arguments of mixed types in the slow path.
Consider the following: import tensorflow as tf tf.enable_eager_execution() x = tf.Variable(1.0) tf.Print(x, ["foo", x]) Prior to this commit, this snippet would fail with an error: ValueError: exceptions.TypeError: object of type 'ResourceVariable' has no len() raised from the call to ops.EagerTensor in convert_to_mixed_eager_tensors. With this commit, the tf.Print call works correctly. Note that convert_to_mixed_eager_tensors is only called in the slow path of operation execution (i.e., when TFE_Py_FastPathExecute fails). Which happens rarely (e.g., when mixing primitive string and EagerTensor/ResourceVariable arguments). PiperOrigin-RevId: 205408407
Loading
Please sign in to comment