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 in utils.load_enet #2

Open
lps683 opened this issue Jun 10, 2018 · 5 comments
Open

error in utils.load_enet #2

lps683 opened this issue Jun 10, 2018 · 5 comments

Comments

@lps683
Copy link

lps683 commented Jun 10, 2018

Hello, i really appreciate your work. It helped me a lot.
but i met some problems when i ran "python training.py",it said as follow,

Traceback (most recent call last):
File "training.py", line 241, in
run()
File "training.py", line 115, in run
last_prelu = utils.load_enet(sess, model_dir, input_image, batch_size)
File "/home/lps/DL/instance-segmentation-with-discriminative-loss-tensorflow/utils.py", line 27, in load_enet
saver.restore(sess, checkpoint)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1439, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 767, in run
run_metadata_ptr)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 965, in _run
feed_dict_string, options, run_metadata)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1015, in _do_run
target_list, options, run_metadata)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1035, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Key ENet/bottleneck3_7_batch_norm2/gamma not found in checkpoint
[[Node: save/RestoreV2_473 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_473/tensor_names, save/RestoreV2_473/shape_and_slices)]]
[[Node: save/RestoreV2_619/_1241 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_3105_save/RestoreV2_619", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]]

Caused by op u'save/RestoreV2_473', defined at:
File "training.py", line 241, in
run()
File "training.py", line 115, in run
last_prelu = utils.load_enet(sess, model_dir, input_image, batch_size)
File "/home/lps/DL/instance-segmentation-with-discriminative-loss-tensorflow/utils.py", line 26, in load_enet
saver = tf.train.Saver(variables_to_restore)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1051, in init
self.build()
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1081, in build
restore_sequentially=self._restore_sequentially)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 675, in build
restore_sequentially, reshape)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 402, in _AddRestoreOps
tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 242, in restore_op
[spec.tensor.dtype])[0])
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/ops/gen_io_ops.py", line 668, in restore_v2
dtypes=dtypes, name=name)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
op_def=op_def)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2395, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/home/lps/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1264, in init
self._traceback = _extract_stack()

NotFoundError (see above for traceback): Key ENet/bottleneck3_7_batch_norm2/gamma not found in checkpoint
[[Node: save/RestoreV2_473 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_473/tensor_names, save/RestoreV2_473/shape_and_slices)]]
[[Node: save/RestoreV2_619/_1241 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_3105_save/RestoreV2_619", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]]

it seems some errors in Enet checkpoint files. I hope you can help me. Thanks!

@hq-jiang
Copy link
Owner

Hi. The loading worked for other people, so you might want to check your tensorflow version. It should be around 1.2 -1.3, perhaps you have a newer version which is not compatible?

@optimal16
Copy link

@hq-jiang hello,I feel your Project is very nice, but the meanshift cluster is so slow, Do you have good recommendation? thank you

@hq-jiang
Copy link
Owner

hq-jiang commented Sep 30, 2018

I was also surprised that mean shift is quite slow. What you can do is, increase the number of threads in the mean shift and reduce the tolerance to stop the iterations earlier. Or you could try to adapt the network to output a lower resolution. Than you would have less points to run the mean shift.

By the way, you should create a new issue since it is not related to the current one.

@MingtaoFu
Copy link

same problem

@pengyiwu
Copy link

same problem

i have the same problem after i upgrade my tensorflow-gpu version to 1.2......................

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

5 participants