我已经将tf_upgrade_v2 TF1代码升级到了TF2。我两个都是新手。我得到了下一个错误:
RuntimeError: tf.placeholder() is not compatible with eager execution.
我有一些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))
你能给我一些关于如何进行的建议吗?有没有什么“快速”的解决方案?或者我应该重新编码这个?
https://stackoverflow.com/questions/56561734
复制相似问题