Adding the code below may be helpful:
import tensorflow.compat.v1.keras.backend as K import tensorflow as tf tf.compat.v1.disable_eager_execution()

Adding the code below may be helpful:
import tensorflow.compat.v1.keras.backend as K import tensorflow as tf tf.compat.v1.disable_eager_execution()