AttributeError: module…ops‘ has no attribute ‘_TensorLike‘, ValueError: `updates` argument..eager

purpose
The combination of Keras and Tensorflow is very convenient. However, there are a lot of pits.
* the question is:
AttributeError: module ‘tensorflow. Python. The framework. The ops’ has no attribute’ _TensorLike
because keras import and tensorflow keras import of primary and secondary, there are differences in structure;
Modify the
Br> from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation
from keras. optimzimport RMSprop
Modified
the from tensorflow. Keras. Models import Sequential
the from tensorflow. Keras. The layers import Dense, Dropout, Activation
the from tensorflow. Keras. Optimizers import RMSprop
There are twists and turns in between
The previous python3.6 + keras that were initially searched were as :
tensorflow_backend.py line703
def is_tensor(x):
return isinstance(x, tf_ops._TensorLike) or tf_ops. Is_dense_tensor_like (x)
return type modified as:
return isinstance(x, core_tf_types.or tf_ops. Is_dense_tensor_like (x)
* the result changes one bug and introduces another:
* ValueError: updates argument is not supported during eager execution. And this bug is only an updated version, but mine is the latest version; Tangled for a long time, a face covered in circles.
* finally restore the modification, return to search the original wrong solution. Find the one above.
conclusion
Try more than one problem modification. If one problem modification introduces another, then either follow the problem modification. Or go back to the origin and find the answer again. That is, if you change one problem and introduce another, then maybe you started with the wrong solution.

Read More: