I was doing some exercise in tensorflow in google colab and trying something under eager execution. When I was practicing on the tf.case by running the code below:
x = tf.random_normal([])
y = tf.random_normal([])
op = tf.case({tf.less(x,y):tf.add(x,y), tf.greater(x,y):tf.subtract(x,y)}, default = tf.multiply(x,y), exclusive = True)
I have followed the example in the tf.case carefully but it just keeps reporting an attribute error:
AttributeError: Tensor.name is meaningless when eager execution is enabled.
I am new to python and TF as well as deep learning. Can anyone try to run the code above and help me figure out?
Thank you