EdjeElectronics / TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

How to train a TensorFlow Object Detection Classifier for multiple object detection on Windows
Apache License 2.0
2.92k stars 1.3k forks source link

NameError: name 'op_def_lib' is not defined #439

Open TheMaskedLord opened 4 years ago

TheMaskedLord commented 4 years ago

When I try to create an Inference graph using command There is an eror ! (tensorflow1) C:\tensorflow1\models\research\object_detection>python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_pets.config --trained_checkpoint_prefix training/model.ckpt-33707 --output_directory inference_graph

(tensorflow1) C:\tensorflow1\models\research\object_detection>python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_pets.config --trained_checkpoint_prefix training/model.ckpt-33707 --output_directory inference_graph 2020-02-05 20:23:09.334515: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll Traceback (most recent call last): File "export_inference_graph.py", line 108, in from object_detection import exporter File "C:\tensorflow1\models\research\object_detection\exporter.py", line 20, in from tensorflow.contrib.quantize.python import graph_matcher File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib__init.py", line 22, in from tensorflow.contrib import bayesflow File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\bayesflow__init__.py", line 24, in from tensorflow.contrib.bayesflow.python.ops import csiszar_divergence File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\bayesflow\python\ops\csiszar_divergence.py", line 26, in from tensorflow.contrib.bayesflow.python.ops.csiszar_divergence_impl import * File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\bayesflow\python\ops\csiszar_divergence_impl.py", line 43, in from tensorflow.contrib import framework as contrib_framework File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\framework\init.py", line 93, in from tensorflow.contrib.framework.python.ops import * File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\framework\python\ops\init__.py", line 28, in from tensorflow.contrib.framework.python.ops.variables import * File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\framework\python\ops\variables.py", line 26, in from tensorflow.contrib.framework.python.ops import gen_variable_ops File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\framework\python\ops\gen_variable_ops.py", line 95, in _op_def_lib = _InitOpDefLibrary(b"\nR\n\017ZeroInitializer\022\013\n\003ref\"\001T\200\001\001\032\022\n\noutput_ref\"\001T\200\001\001\"\033\n\001T\022\004type:\020\n\0162\014\001\002\003\t\004\005\006\021\023\026\027\016\230\001\001") File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\framework\python\ops\gen_variable_ops.py", line 59, in _InitOpDefLibrary op_def_lib.add_op_list(op_list) NameError: name 'op_def_lib' is not defined

(tensorflow1) C:\tensorflow1\models\research\object_detection>

Please help me...

maacofficial commented 4 years ago

What is your tensorflow version?