davidsandberg / facenet

Face recognition using Tensorflow
MIT License
13.83k stars 4.81k forks source link

Validation on LFW:Invalid argument: You must feed a value for placeholder tensor 'batch_size_1' with dtype int32 [[{{node batch_size_1}}]] #1125

Open Sawatdatta opened 4 years ago

Sawatdatta commented 4 years ago

while validating on LFW I am getting following error:

Traceback (most recent call last): File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1356, in _do_call return fn(*args) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1341, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1429, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: You must feed a value for placeholder tensor 'batch_size_1' with dtype int32 [[{{node batch_size_1}}]] [[InceptionResnetV1/Logits/Dropout/cond/Switch/_2129]] (1) Invalid argument: You must feed a value for placeholder tensor 'batch_size_1' with dtype int32 [[{{node batch_size_1}}]] 0 successful operations. 0 derived errors ignored.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "src/validate_on_lfw.py", line 164, in main(parse_arguments(sys.argv[1:])) File "src/validate_on_lfw.py", line 83, in main args.use_flipped_images, args.use_fixed_image_standardization) File "src/validate_on_lfw.py", line 112, in evaluate emb, lab = sess.run([embeddings, labels], feed_dict=feed_dict) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 950, in run run_me facenet.load_model(args.model, input_map=input_map)tadata_ptr) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1173, in _run feed_dict_tensor, options, run_metadata) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1350, in _do_run run_metadata) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1370, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: You must feed a value for placeholder tensor 'batch_size_1' with dtype int32 [[node batch_size_1 (defined at /home/dds/venvs/tf1x/facenetsr/src/facenet.py:393) ]] [[InceptionResnetV1/Logits/Dropout/cond/Switch/_2129]] (1) Invalid argument: You must feed a value for placeholder tensor 'batch_size_1' with dtype int32 [[node batch_size_1 (defined at /home/dds/venvs/tf1x/facenetsr/src/facenet.py:393) ]] 0 successful operations. 0 derived errors ignored.

Original stack trace for 'batch_size_1': File "src/validate_on_lfw.py", line 164, in main(parse_arguments(sys.argv[1:])) File "src/validate_on_lfw.py", line 73, in main facenet.load_model(args.model, input_map=input_map) File "/home/dds/venvs/tf1x/facenetsr/src/facenet.py", line 393, in load_model saver = tf.train.import_meta_graph(os.path.join(model_exp, meta_file), input_map=input_map) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1449, in import_meta_graph kwargs)[0] File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1473, in _import_meta_graph_with_return_elements kwargs)) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/framework/meta_graph.py", line 857, in import_scoped_meta_graph_with_return_elements return_elements=return_elements) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func return func(*args, **kwargs) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 443, in import_graph_def _ProcessNewOps(graph) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 236, in _ProcessNewOps for new_op in graph._add_new_tf_operations(compute_devices=False): # pylint: disable=protected-access File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3751, in _add_new_tf_operations for c_op in c_api_util.new_tf_operations(self) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3751, in for c_op in c_api_util.new_tf_operations(self) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3641, in _create_op_from_tf_operation ret = Operation(c_op, self) File "/home/dds/venvs/tf1x/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2005, in init self._traceback = tf_stack.extract_stack()

Yujian-daniel commented 4 years ago

I have met the same proplem, have you handle it? I appreciate it if you can share your experience.

Sawatdatta commented 4 years ago

@DanielYu7 Not yet. Please reply me if you get the solution.

StonePanda commented 4 years ago

same issue, have u resolved id? @DanielYu7