Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'module' object has no attribute '_VARSCOPE_KEY' #51

Open
shizhenbo opened this issue Sep 20, 2018 · 4 comments
Open

AttributeError: 'module' object has no attribute '_VARSCOPE_KEY' #51

shizhenbo opened this issue Sep 20, 2018 · 4 comments

Comments

@shizhenbo
Copy link

When I run the stageI/run_exp.py. I meet the problem as follows:
Traceback (most recent call last):
File "/home/shizhenbo/PycharmProjects/StackGAN-master/stageI/run_exp.py", line 62, in
image_shape=dataset.image_shape
File "/home/shizhenbo/PycharmProjects/StackGAN-master/stageI/model.py", line 34, in init
self.d_encode_img_template = self.d_encode_image()
File "/home/shizhenbo/PycharmProjects/StackGAN-master/stageI/model.py", line 164, in d_encode_image
custom_conv2d(self.df_dim, k_h=4, k_w=4).
File "/home/shizhenbo/.conda/envs/py27/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1965, in method
with _method_scope(input_layer, scope_name) as (scope, _):
File "/home/shizhenbo/.conda/envs/py27/lib/python2.7/contextlib.py", line 17, in enter
return self.gen.next()
File "/home/shizhenbo/.conda/envs/py27/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1776, in _method_scope
scopes.var_and_name_scope((name, None)) as (scope, var_scope):
File "/home/shizhenbo/.conda/envs/py27/lib/python2.7/contextlib.py", line 17, in enter
return self.gen.next()
File "/home/shizhenbo/.conda/envs/py27/lib/python2.7/site-packages/prettytensor/scopes.py", line 55, in var_and_name_scope
vs_key = tf.get_collection_ref(variable_scope._VARSCOPE_KEY)
AttributeError: 'module' object has no attribute '_VARSCOPE_KEY'
Why ?
Maybe the number of lines are different to yours. Someone can help me? Thank you

@krshrimali
Copy link

krshrimali commented Oct 23, 2018

I had a similar issue and solved it using pip install tensorflow==1.7.0. This is because of PrettyTensor incompatibility in some functions with Tensorflow's latest versions.

For more details: google/prettytensor#62

Let me know if it doesn't work.

@jiteshpabla
Copy link

Well, it still doesn't work for me. The error stays with tensorflow versions 1.7.0, 1.4.0, 1.0 and 0.12.

@Dragomir2020
Copy link

If you are using tensorflow 0.12 I had to downgrade PrettyTensor to version 0.7.1 from 0.7.4 to get it to run. pip install prettytensor==0.7.1

@Cdeo05
Copy link

Cdeo05 commented May 1, 2020

i am facing the same issue and cannot install tensorflow 1.7.0 on windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants