In the code example you provided, you’re casting X_train as a double tensor, whereas Y_train is a float tensor. Can you try casting X_train as a float tensor? I.e. X_train = tf.cast(X_train, dtype=tf.float32).
tf.keras.backend.set_floatx('float32') tf.keras.backend.set_floatx('float64')
I tried both , but didn’t worked
The tutorial does works if I run it as it is!
I’m not being able to replicate your error. Can you please share your full code, including the data you’re using, to see if I can help you find the problem? My guess is that this is something related to the data types.