Open ola0x opened 5 years ago
What version of ImageAI/Keras/Tensorflow are you using? can you share your code?
Consider that the model for object detection provided by ImageAI is jus a Keras model, you can look how is this loaded on the evaluation method, and then all you need is just to import it.
i had same issue , please update your keras and imageai to the latest version and use tensorflow =1.15.0rc0....may be this will work
Did you solve the problem at last? I met the same problem.
yes
Can you tell me how to solve the problem?Thx
can u tell us version of tensorflow,imageAI,keras etc
tensorflow-gpu = 1.14.0, keras = 2.2.4 TensorRt = 6.0.1.5
When i tried converting my trained model (.h5) to tensorflow version ( .pb ), i got the flowing error.
File "C:\Users\hp\Documents\ml\New Model\CustomModel.py", line 13, in
predictor.save_model_to_tensorflow(new_model_folder= os.path.join(execution_path, "tensorflow_model"), new_model_name="idenprof_resnet_tensorflow.pb")
File "C:\Program Files\Python37\lib\site-packages\imageai\Prediction\Custom__init__.py", line 589, in save_model_to_tensorflow
main_graph = graph_util.convert_variables_to_constants(sess, init_graph, out_nodes)
File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\util\deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\framework\graph_util_impl.py", line 297, in convert_variables_to_constants
source_op_name = get_input_name(node)
File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\framework\graph_util_impl.py", line 254, in get_input_name
raise ValueError("Tensor name '{0}' is invalid.".format(node.input[0]))
ValueError: Tensor name 'batch_normalization/cond/ReadVariableOp/Switch:1' is invalid.