当我使用facenet时,我在_lfw.py公司src/lfw\ U 160/src/20170512110547/“”

2024-03-29 07:03:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着用你_lfw.py公司使用“20170512-110547”型号评估LFW 我使用anaconda和tensorflow(我是cv的初学者,所以我不确定我给出的问题描述是否详细)

tensorflow/core/graph/graph_constructor.cc:1244] Importing a graph 
with a lower producer version 21 into an existing graph with producer 
version 26. Shape inference will have run different parts of the graph 
with different producer versions.
Traceback (most recent call last):

File "/home/wind/anaconda3/envs/tensorflow-cpu/lib/python3.6/site- 
packages/tensorflow/python/framework/importer.py", line 489, in 
import_graph_def graph._c_graph, serialized, options)  # pylint: 
disable=protected-access

tensorflow.python.framework.errors_impl.InvalidArgumentError: Input 0 
of node cross_entropy_per_example/Shape was passed int32 from 
batch_join:1 incompatible with expected int64.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "src/validate_on_lfw.py", line 164, in <module>
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/wind/facenet/src/facenet.py", line 381, in load_model
saver = tf.train.import_meta_graph(os.path.join(model_exp, meta_file), input_map=input_map)
File "/home/wind/anaconda3/envs/tensorflow-cpu/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1955, in import_meta_graph
**kwargs)
File "/home/wind/anaconda3/envs/tensorflow-cpu/lib/python3.6/site-packages/tensorflow/python/framework/meta_graph.py", line 743, in import_scoped_meta_graph
producer_op_list=producer_op_list)
File "/home/wind/anaconda3/envs/tensorflow-cpu/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func
return func(*args, **kwargs)
File "/home/wind/anaconda3/envs/tensorflow-cpu/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 493, in import_graph_def
raise ValueError(str(e))

ValueError: Input 0 of node cross_entropy_per_example/Shape was passed 
int32 from batch_join:1 incompatible with expected int64.

Tags: producerinpyhomelibtensorflowwithline