Anaconda3 (64-bit)
2018-07-05 09:53:42.221784: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Model directory: D:\my_program\Anaconda3\envs\tensorflow\Lib\site-packages\facenet\src\models\20170512-110547
Metagraph file: model-20170512-110547.meta
Checkpoint file: model-20170512-110547.ckpt-250000
2018-07-05 09:53:46.287150: W T:\src\github\tensorflow\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 "D:\my_program\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\frameworkimporter.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 "D:\my_program\Anaconda3\envs\tensorflow\Lib\site-packages\facenet\src\validate_on_lfw.py", line 164, in
main(parse_arguments(sys.argv[1:]))
File "D:\my_program\Anaconda3\envs\tensorflow\Lib\site-packages\facenet\src\validate_on_lfw.py", line 73, in main
facenet.load_model(args.model, input_map=input_map)
File "D:\my_program\Anaconda3\envs\tensorflow\Lib\site-packages\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 "D:\my_program\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\saver.py", line 1955, in import_meta_graph
*kwargs)
File "D:\my_program\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\frameworkmeta_graph.py", line 743, in import_scoped_meta_graph
producer_op_list=producer_op_list)
File "D:\my_program\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\util\deprecation.py", line 432, in new_func
return func(args, **kwargs)
File "D:\my_program\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\frameworkimporter.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.
I am also getting the same error. Any insight?
Change the dtypes for data_flow_ops.FIFOQueue to tf.int64 from tf.int32. And also change the dtypes for labels_placeholder and control_placeholder to tf.int64 from tf.int32. That did it for me.
hello, I meet the same problem. Could you give more details? I'm so puzzled now.
@chensteven Thank you! In my case it also worked. @Alexanderisgod You can check chensteven's answer. It worked to me.
Most helpful comment
Change the dtypes for data_flow_ops.FIFOQueue to tf.int64 from tf.int32. And also change the dtypes for labels_placeholder and control_placeholder to tf.int64 from tf.int32. That did it for me.