cooolallen / Face-recognition-with-User-interface

Master Piece
6 stars 3 forks source link

Unable to run the code #2

Open Zumbalamambo opened 7 years ago

Zumbalamambo commented 7 years ago

Thanks for your amazing contribution. I get the following error while running this code.

[017-09-09 13:32:37.700708: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-09-09 13:32:37.700713: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-09 13:32:37.700717: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1139, in _do_call
    return fn(*args)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1121, in _run_fn
    status, run_metadata)
  File "/Users/anaconda/envs/cnn/lib/python3.6/contextlib.py", line 88, in __exit__
    next(self.gen)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: Tensor name "InceptionResnetV1/Bottleneck/BatchNorm/beta" not found in checkpoint files /Users/Downloads/facenet_ui/pretrained_models/FaceNet/model-20161116-234200.ckpt-80000
     [[Node: save/RestoreV2_18 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_18/tensor_names, save/RestoreV2_18/shape_and_slices)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Downloads/facenet_ui/Top.py", line 186, in <module>
    FR.build()
  File "/Users/Downloads/facenet_ui/FaceRecognizer.py", line 174, in build
    saver.restore(self._sess, os.path.join(self._facenet_model_dir, ckpt_file))
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1548, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 789, in run
    run_metadata_ptr)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 997, in _run
    feed_dict_string, options, run_metadata)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1132, in _do_run
    target_list, options, run_metadata)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1152, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Tensor name "InceptionResnetV1/Bottleneck/BatchNorm/beta" not found in checkpoint files /Users/Downloads/facenet_ui/pretrained_models/FaceNet/model-20161116-234200.ckpt-80000
     [[Node: save/RestoreV2_18 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_18/tensor_names, save/RestoreV2_18/shape_and_slices)]]

Caused by op 'save/RestoreV2_18', defined at:
  File "/Users/Downloads/facenet_ui/Top.py", line 186, in <module>
    FR.build()
  File "/Users/Downloads/facenet_ui/FaceRecognizer.py", line 173, in build
    saver = tf.train.Saver()
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1139, in __init__
    self.build()
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1170, in build
    restore_sequentially=self._restore_sequentially)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 691, in build
    restore_sequentially, reshape)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 407, in _AddRestoreOps
    tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 247, in restore_op
    [spec.tensor.dtype])[0])
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/ops/gen_io_ops.py", line 640, in restore_v2
    dtypes=dtypes, name=name)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
    op_def=op_def)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2506, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/Users/anaconda/envs/cnn/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1269, in __init__
    self._traceback = _extract_stack()

NotFoundError (see above for traceback): Tensor name "InceptionResnetV1/Bottleneck/BatchNorm/beta" not found in checkpoint files /Users/Downloads/facenet_ui/pretrained_models/FaceNet/model-20161116-234200.ckpt-80000
     [[Node: save/RestoreV2_18 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_18/tensor_names, save/RestoreV2_18/shape_and_slices)]]
](url)
glitzflitz commented 5 years ago

@Zumbalamambo Did you fix the problem? I'm getting same error.