google / compare_gan

Compare GAN code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

module 'tensorflow' has no attribute 'GraphKeys'

Sajal-1 opened this issue · comments

Getting this error despite doing pip install -e .

$ python main.py --help
Traceback (most recent call last):
File "main.py", line 31, in
from compare_gan import runner_lib
File "/home/maths/dual/mt6160653/biggan/compare_gan-master/compare_gan/runner_lib.py", line 30, in
from compare_gan import eval_gan_lib
File "/home/maths/dual/mt6160653/biggan/compare_gan-master/compare_gan/eval_gan_lib.py", line 27, in
from compare_gan import eval_utils
File "/home/maths/dual/mt6160653/biggan/compare_gan-master/compare_gan/eval_utils.py", line 35, in
import tensorflow_gan as tfgan
File "/home/maths/dual/mt6160653/.local/lib/python3.6/site-packages/tensorflow_gan/init.py", line 72, in
from tensorflow_gan.python import * # pylint: disable=wildcard-import
File "/home/maths/dual/mt6160653/.local/lib/python3.6/site-packages/tensorflow_gan/python/init.py", line 36, in
from tensorflow_gan.python import estimator
File "/home/maths/dual/mt6160653/.local/lib/python3.6/site-packages/tensorflow_gan/python/estimator/init.py", line 24, in
from .gan_estimator import *
File "/home/maths/dual/mt6160653/.local/lib/python3.6/site-packages/tensorflow_gan/python/estimator/gan_estimator.py", line 28, in
from tensorflow_gan.python import contrib_utils as contrib
File "/home/maths/dual/mt6160653/.local/lib/python3.6/site-packages/tensorflow_gan/python/contrib_utils.py", line 48, in
collection=tf.GraphKeys.GLOBAL_VARIABLES):
AttributeError: module 'tensorflow' has no attribute 'GraphKeys'

I have read this but I cannot alter the package tensorflow_gan.

It was just a tensorflow version issue. Does not work with tensorflow2.