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 loading the pretrained model #25

Closed
pobei opened this issue Mar 20, 2017 · 4 comments
Closed

error while loading the pretrained model #25

pobei opened this issue Mar 20, 2017 · 4 comments

Comments

@pobei
Copy link

pobei commented Mar 20, 2017

when i run the demo using the pretrained model ,errors happened ,the log says the graph do not include d_bn1/moving_mean,i check the graph by using "print graph.get_operations()",and do not find d_bn1.i am not sure what happended...please help me

Traceback (most recent call last):
File "complete.py", line 35, in
dcgan.complete(args)
File "/home/oeasy/pobei/dcgan-completion.tensorflow-master/model.py", line 225, in complete
isLoaded = self.load(self.checkpoint_dir)
File "/home/oeasy/pobei/dcgan-completion.tensorflow-master/model.py", line 376, in load
self.saver.restore(self.sess, ckpt.model_checkpoint_path)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1388, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1034, 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 checkpoint/DCGAN.model-106502
[[Node: save/RestoreV2_3 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_3/tensor_names, save/RestoreV2_3/shape_and_slices)]]

Caused by op u'save/RestoreV2_3', defined at:
File "complete.py", line 34, in
checkpoint_dir=args.checkpointDir, lam=args.lam)
File "/home/oeasy/pobei/dcgan-completion.tensorflow-master/model.py", line 65, in init
self.build_model()
File "/home/oeasy/pobei/dcgan-completion.tensorflow-master/model.py", line 110, in build_model
self.saver = tf.train.Saver(max_to_keep=1)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1000, in init
self.build()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1030, in build
restore_sequentially=self._restore_sequentially)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 624, in build
restore_sequentially, reshape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 361, 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 200, in restore_op
[spec.tensor.dtype])[0])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 441, in restore_v2
dtypes=dtypes, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1128, in init
self._traceback = _extract_stack()

NotFoundError (see above for traceback): Tensor name "d_bn1/moving_variance" not found in checkpoint files checkpoint/DCGAN.model-106502
[[Node: save/RestoreV2_3 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_3/tensor_names, save/RestoreV2_3/shape_and_slices)]]

@pobei pobei closed this as completed Mar 20, 2017
@pobei pobei reopened this Mar 20, 2017
@pobei pobei closed this as completed Mar 20, 2017
@zoraZHJ
Copy link

zoraZHJ commented Mar 23, 2017

I have the same error, have you solved it?

@pobei
Copy link
Author

pobei commented Mar 24, 2017

not yet ,may be this is caused by the version of tensorflow

@zoraZHJ
Copy link

zoraZHJ commented Mar 24, 2017

@pobei I use the tensorflow 0.12.1 python2.7, what's yours ?

@pobei
Copy link
Author

pobei commented Mar 24, 2017

1.0.1, and i notice the author say the version should lower than 0.10,

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

2 participants