paarthneekhara / text-to-image

Text to image synthesis using thought vectors
MIT License
2.17k stars 398 forks source link

error while generating images #17

Open zhoutao201601 opened 7 years ago

zhoutao201601 commented 7 years ago

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 "generateimages.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 commented 7 years ago

I sovled this quesition Ths

mohitrbhardwaj commented 6 years ago

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

chetanshetty commented 5 years ago

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