paarthneekhara / text-to-image

Text to image synthesis using thought vectors
MIT License
2.16k stars 394 forks source link

error while generating images #12

Open Exception4U opened 7 years ago

Exception4U commented 7 years ago

 python generate_images.py --model_path=Data/Models/latest_model_flowers_temp.ckpt --n_images=7 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/tushar/codes/python_codes/text-to-image/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/tushar/codes/python_codes/text-to-image/model.py", line 161, in discriminator h1 = ops.lrelu( self.d_bn1(ops.conv2d(h0, self.options['df_dim']*2, name = 'd_h1_conv'))) #16 File "/home/tushar/codes/python_codes/text-to-image/Utils/ops.py", line 34, in call ema_apply_op = self.ema.apply([batch_mean, batch_var]) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py", line 391, in apply self._averages[var], var, decay, zero_debias=zero_debias)) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py", line 70, in assign_moving_average update_delta = _zero_debias(variable, value, decay) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py", line 177, in _zero_debias trainable=False) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 1024, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 850, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 346, in get_variable validate_shape=validate_shape) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 331, in _true_getter caching_device=caching_device, validate_shape=validate_shape) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 650, in _get_single_variable "VarScope?" % name) ValueError: Variable d_bn1/d_bn1_2/d_bn1_2/moments/moments_1/mean/ExponentialMovingAverage/biased does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

tjrileywisc commented 7 years ago

I'm getting this as well- what version of tensorflow do you have?

paarthneekhara commented 7 years ago

This is a tensorflow version issue. IIRC the model is trained on tensorflow v 1.10

hjchen-thu commented 7 years ago

@paarthneekhara Hi, do u mean tensorflow version 1.10 or 0.11.0rc0?(Cause the requirements.txt says only need tensorflow 0.11.0rc0) I tried tensorflow over 1.0.0 and there exists api problems.

paarthneekhara commented 7 years ago

I just ran the code and it runs fine on version 0.11.0rc2.

hjchen-thu commented 7 years ago

@paarthneekhara I have changed to tf 0.11.0 and it works now. Thx all the same : )

nashory commented 6 years ago

@paarthneekhara TF 0.11.0 version seems to work. Thanks :)

ustcxxs commented 6 years ago

Could not find a version that satisfies the requirement tensorflow-gpu==0.11.0rc2 (from versions: 0.12.0rc0, 0.12.0rc1, 0.12.0, 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0) No matching distribution found for tensorflow-gpu==0.11.0rc2