Scott_Zhu:

from tensorflow import keras

x=tf.keras.Input([10])
dense = tf.keras.layers.Dense(1)
y = dense(x)

assert(keras.backend.is_keras_tensor(x))
assert(keras.backend.is_keras_tensor(y))

assert(tf.keras.backend.is_keras_tensor(x))
assert(tf.keras.backend.is_keras_tensor(y))



I guess it was arising because
import tensorflow as tf
from tensorflow import keras
from tensorflow.python.keras.layers import Input, Dense,LSTM

now I moved to
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.layers import Input, Dense, LSTM

no issue as of now with TF 2.7.0