google-deepmind / graph_nets

Build Graph Nets in Tensorflow
https://arxiv.org/abs/1806.01261
Apache License 2.0
5.36k stars 782 forks source link

Error while using the placeholder function from utils_tf #149

Closed Krishuthapa closed 1 year ago

Krishuthapa commented 1 year ago

Issue: I am using the graph_nets library with tf2. I am trying to use utils_tf.placeholders_from_networkxs() this function to create the placeholders for my graphs to implement the EncodeProcessDecode feature. However , I am getting the following message with this:

module 'tensorflow' has no attribute 'placeholder'

Aren't the functions in the utils file compatible with the tensorflow v2?

alvarosg commented 1 year ago

Thanks for your comment!

Actually the concept of tf.placeholder was associated with tf.Session, and both were removed in TensorFlow 2. I would recommend looking at the TensorFlow 2 demos for some examples of how to use the library without tf.Session.