RuntimeError: tf.placeholder() is not compatible with eager execution
Full error message
I have upgraded with tf_upgrade_v2 TF1 code to TF2. I'm a noob with both. I got the next error: RuntimeError: tf.placeholder() is not compatible with eager execution. I have some tf.compat.v1.placeholder(). self.temperature = tf.compat.v1.placeholder_with_default(1., shape=()) self.edges_labels = tf.compat.v1.placeholder(dtype=tf.int64, shape=(None, vertexes, vertexes)) self.nodes_labels = tf.compat.v1.placeholder(dtype=tf.int64, shape=(None, vertexes)) self.embeddings = tf.compat.v1.placeholder(dtype=tf.float32, shape=(None, embedding_dim)) Could you give me any advice about how to proceed? Any "fast" solutions? or should I to recode this?
Solutionsource: stackoverflow \u2197
I found an easy solution here: disable Tensorflow eager execution Basicaly it is: tf.compat.v1.disable_eager_execution() With this, you disable the default activate eager execution and you don't need to touch the code much more.
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/161061a82f015f7c4cbf081c00b01df43c678128e3e79e504a9603b1055dce1chash \u00b7 161061a82f015f7c4cbf081c00b01df43c678128e3e79e504a9603b1055dce1c