Tensorflow version problems
lunaticbg opened this issue · comments
Hello, thanks for your nice work on graph classification.
Recently, when I use your code to run experiments, I use pip install -r requirement.txt
, but pip tells me that tensorflow1.15 requires tensorboard>1.15 <1.16, but tensorflow-gpu2.3 needs tensorboard>2.3. So I am eager to know how to build a env with correct tf version to run your code, thanks.
It is common problem, especilly in tensorflow (abandon reason ++). I freeze the other env list, and test it, it looks like working good. Hope it can help you.
requirements.txt
Thanks. I solved it with using tf2.2
, cause that tf1.14
needs cudnn7.4 & cuda 10.0, which is uncompatible for my machine. And this is my requirements.txt, who use tf2.x can refer to it.
And for the problem of migrating tf1.x
code to tf2.x
, please read tf migrate. As for tf.contrib
, delete line129, 130 in train.py
, and change line 135, 136 in train.py
from
self.optimizer = tf.compat.v1.train.MomentumOptimizer(self.lr, self.mom).minimize(self.loss + self.l2)
to
self.optimizer = tf.compat.v1.train.MomentumOptimizer(self.lr, self.mom).minimize(self.loss +tf.compat.v1.losses.get_regularization_losses())
.
So far, tf2.x
users can run the code succefully.