paarthneekhara / text-to-image

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

checkpoint files while generating image #37

Open markphilip2018 opened 6 years ago

markphilip2018 commented 6 years ago

when run command --> python generate_images.py --model_path=Data/Models/latest_model_flowers_temp.ckpt --n_images=8

using a Pre-trained Models. I got this error : `2018-02-01 05:17:12.967163: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX Traceback (most recent call last): File "generate_images.py", line 109, in main() File "generate_images.py", line 70, in main saver.restore(sess, args.model_path) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1686, in restore {self.saver_def.filename_tensor_name: save_path}) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 895, in run run_metadata_ptr) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1128, in _run feed_dict_tensor, options, run_metadata) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1344, in _do_run options, run_metadata) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1363, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.NotFoundError: Tensor name "d_bn1/moving_variance" not found in checkpoint files Data/Models/latest_model_flowers_temp.ckpt [[Node: save/RestoreV2_3 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_3/tensor_names, save/RestoreV2_3/shape_and_slices)]]

Caused by op u'save/RestoreV2_3', defined at: File "generate_images.py", line 109, in main() File "generate_images.py", line 68, in main saver = tf.train.Saver() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1239, in init self.build() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1248, in build self._build(self._filename, build_save=True, build_restore=True) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1284, in _build build_save=build_save, build_restore=build_restore) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 765, in _build_internal restore_sequentially, reshape) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 428, in _AddRestoreOps tensors = self.restore_op(filename_tensor, saveable, preferred_shard) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 268, in restore_op [spec.tensor.dtype])[0]) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 1031, in restore_v2 shape_and_slices=shape_and_slices, dtypes=dtypes, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 3160, in create_op op_def=op_def) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1625, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

NotFoundError (see above for traceback): Tensor name "d_bn1/moving_variance" not found in checkpoint files Data/Models/latest_model_flowers_temp.ckpt [[Node: save/RestoreV2_3 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_3/tensor_names, save/RestoreV2_3/shape_and_slices)]]`

My os : ubuntu 16.04 TF : 1.5

HassanAzzam commented 6 years ago

Same here!

HassanAzzam commented 6 years ago

I think we must download some files with latest_model_flowers_temp.ckpt like checkpoint, .meta or .index, maybe.. I'm just guessing.

rajmphasis commented 6 years ago

Hi guys, I tried reproducing results from this repo. Following are the variables that got created for mean and varaince. (<tf.Tensor 'g_bn0_1/g_bn0/moments/Squeeze:0' shape=(512,) dtype=float32>, <tf.Tensor 'g_bn0_1/g_bn0/moments/Squeeze_1:0' shape=(512,) dtype=float32>) (<tf.Tensor 'g_bn1_1/g_bn1/moments/Squeeze:0' shape=(256,) dtype=float32>, <tf.Tensor 'g_bn1_1/g_bn1/moments/Squeeze_1:0' shape=(256,) dtype=float32>) (<tf.Tensor 'g_bn2_1/g_bn2/moments/Squeeze:0' shape=(128,) dtype=float32>, <tf.Tensor 'g_bn2_1/g_bn2/moments/Squeeze_1:0' shape=(128,) dtype=float32>) (<tf.Tensor 'g_bn3_1/g_bn3/moments/Squeeze:0' shape=(64,) dtype=float32>, <tf.Tensor 'g_bn3_1/g_bn3/moments/Squeeze_1:0' shape=(64,) dtype=float32>) (<tf.Tensor 'd_bn1_1/d_bn1/moments/Squeeze:0' shape=(128,) dtype=float32>, <tf.Tensor 'd_bn1_1/d_bn1/moments/Squeeze_1:0' shape=(128,) dtype=float32>) (<tf.Tensor 'd_bn2_1/d_bn2/moments/Squeeze:0' shape=(256,) dtype=float32>, <tf.Tensor 'd_bn2_1/d_bn2/moments/Squeeze_1:0' shape=(256,) dtype=float32>) (<tf.Tensor 'd_bn3_1/d_bn3/moments/Squeeze:0' shape=(512,) dtype=float32>, <tf.Tensor 'd_bn3_1/d_bn3/moments/Squeeze_1:0' shape=(512,) dtype=float32>) (<tf.Tensor 'd_bn4_1/d_bn4/moments/Squeeze:0' shape=(512,) dtype=float32>, <tf.Tensor 'd_bn4_1/d_bn4/moments/Squeeze_1:0' shape=(512,) dtype=float32>) (<tf.Tensor 'd_bn1_2/d_bn1/moments/Squeeze:0' shape=(128,) dtype=float32>, <tf.Tensor 'd_bn1_2/d_bn1/moments/Squeeze_1:0' shape=(128,) dtype=float32>) (<tf.Tensor 'd_bn2_2/d_bn2/moments/Squeeze:0' shape=(256,) dtype=float32>, <tf.Tensor 'd_bn2_2/d_bn2/moments/Squeeze_1:0' shape=(256,) dtype=float32>) (<tf.Tensor 'd_bn3_2/d_bn3/moments/Squeeze:0' shape=(512,) dtype=float32>, <tf.Tensor 'd_bn3_2/d_bn3/moments/Squeeze_1:0' shape=(512,) dtype=float32>) (<tf.Tensor 'd_bn4_2/d_bn4/moments/Squeeze:0' shape=(512,) dtype=float32>, <tf.Tensor 'd_bn4_2/d_bn4/moments/Squeeze_1:0' shape=(512,) dtype=float32>) (<tf.Tensor 'd_bn1_3/d_bn1/moments/Squeeze:0' shape=(128,) dtype=float32>, <tf.Tensor 'd_bn1_3/d_bn1/moments/Squeeze_1:0' shape=(128,) dtype=float32>) (<tf.Tensor 'd_bn2_3/d_bn2/moments/Squeeze:0' shape=(256,) dtype=float32>, <tf.Tensor 'd_bn2_3/d_bn2/moments/Squeeze_1:0' shape=(256,) dtype=float32>) (<tf.Tensor 'd_bn3_3/d_bn3/moments/Squeeze:0' shape=(512,) dtype=float32>, <tf.Tensor 'd_bn3_3/d_bn3/moments/Squeeze_1:0' shape=(512,) dtype=float32>) (<tf.Tensor 'd_bn4_3/d_bn4/moments/Squeeze:0' shape=(512,) dtype=float32>, <tf.Tensor 'd_bn4_3/d_bn4/moments/Squeeze_1:0' shape=(512,) dtype=float32>)

I am getting this error: Tensor name "d_bn1/d_bn1_1/d_bn1/moments/Squeeze/ExponentialMovingAverage" not found in checkpoint files Data/Models/latest_model_flowers_temp.ckpt

As I can see, "d_bn1_1/d_bn1/moments/Squeeze/ExponentialMovingAverage" is already available, but this is not available in checkpoint file.

Kindly let me know where I am going wrong.

Tensorflow : 1.6

zhaojw219 commented 5 years ago

Is there a solution already?

RohanBolusani commented 4 years ago

Is there a solution already?

hey did you find any solution??