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

error while generating images #17

Open
zhoutao201601 opened this issue May 1, 2017 · 3 comments
Open

error while generating images #17

zhoutao201601 opened this issue May 1, 2017 · 3 comments

Comments

@zhoutao201601
Copy link

zhoutao@zhoutao:~/project/text-to-image-master$ python generate_images.py --model_path=Data/Models/latest_model_flowers_temp.ckpt --n_images=8

Traceback (most recent call last):
File "generate_images.py", line 106, in
main()
File "generate_images.py", line 64, in main
_, _, _, _, _ = gan.build_model()
File "/home/zhoutao/project/text-to-image-master/model.py", line 40, in build_model
disc_wrong_image, disc_wrong_image_logits = self.discriminator(t_wrong_image, t_real_caption, reuse = True)
File "/home/zhoutao/project/text-to-image-master/model.py", line 158, in discriminator
h0 = ops.lrelu(ops.conv2d(image, self.options['df_dim'], name = 'd_h0_conv')) #32
File "/home/zhoutao/project/text-to-image-master/Utils/ops.py", line 76, in conv2d
initializer=tf.truncated_normal_initializer(stddev=stddev))
File "/home/zhoutao/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 1054, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/home/zhoutao/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 951, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/home/zhoutao/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 356, in get_variable
validate_shape=validate_shape, use_resource=use_resource)
File "/home/zhoutao/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 341, in _true_getter
use_resource=use_resource)
File "/home/zhoutao/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 653, in _get_single_variable
name, "".join(traceback.format_list(tb))))
ValueError: Variable d_h0_conv/w already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:

File "/home/zhoutao/project/text-to-image-master/Utils/ops.py", line 76, in conv2d
initializer=tf.truncated_normal_initializer(stddev=stddev))
File "/home/zhoutao/project/text-to-image-master/model.py", line 158, in discriminator
h0 = ops.lrelu(ops.conv2d(image, self.options['df_dim'], name = 'd_h0_conv')) #32
File "/home/zhoutao/project/text-to-image-master/model.py", line 39, in build_model
disc_real_image, disc_real_image_logits = self.discriminator(t_real_image, t_real_caption)

I get this error,and my tf.version
'1.1.0-rc2'

can you help me?

@zhoutao201601
Copy link
Author

I sovled this quesition Ths

@mohitrbhardwaj
Copy link

@zhoutao201601 I am facing the exact same problem how to solve it?

@chetanshetty
Copy link

@paarthneekhara Can you help us ? All of us are facing the same problem. Using Python 3.7

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

3 participants