tensorflow_web_deploy icon indicating copy to clipboard operation
tensorflow_web_deploy copied to clipboard

Exception: File for model_def_file is missing.

Open forfish opened this issue 8 years ago • 3 comments

Hello! I am glad to see this repository! But when I run it I get an error: Traceback (most recent call last): File "PyClassification.py", line 133, in <module> class ImagenetClassifier(object): File "PyClassification.py", line 143, in ImagenetClassifier "File for {} is missing. Should be at: {}".format(key, val)) Exception: File for model_def_file is missing. Should be at: /home/forfish/Documents/tensorflow_web_deploy/data/model And I changed my retrain the 5 flowers‘s output_graph.pb to model, output_labels.txt to model.meta, after that and I run python PyClassification.py unber it's root. I got error: Traceback (most recent call last): File "PyClassification.py", line 247, in <module> start_from_terminal(app) File "PyClassification.py", line 239, in start_from_terminal setup_app(app) File "PyClassification.py", line 222, in setup_app app.clf = ImagenetClassifier(**ImagenetClassifier.default_args) File "PyClassification.py", line 172, in __init__ saver.restore(self.sess, model_def_file) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1105, in restore {self.saver_def.filename_tensor_name: save_path}) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 372, in run run_metadata_ptr) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 636, in _run feed_dict_string, options, run_metadata) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 708, in _do_run target_list, options, run_metadata) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 728, in _do_call Please help! how can I run your project with the retrain *.db *.txt!

forfish avatar Jul 24 '16 14:07 forfish

@hetaoaoao hi,

I'm getting this error when I try to start app.

File "/root/tensorflow/local/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app
    __import__(module)
  File "/root/tensorflow_web_deploy/PyClassification.py", line 133, in <module>
    class ImagenetClassifier(object):
  File "/root/tensorflow_web_deploy/PyClassification.py", line 143, in ImagenetClassifier
    "File for {} is missing. Should be at: {}".format(key, val))
Exception: File for model_def_file is missing. Should be at: /root/tensorflow_web_deploy/data/model

mkaya93 avatar Nov 29 '16 17:11 mkaya93

I think that you should donwload pretrained sets. just refer to another git:https://github.com/okraus/DeepLoc

just a guess, I try to do this.

peppaseven avatar Aug 26 '17 15:08 peppaseven

Did this issue get resolved ? i am facing the same issue

kashishh2 avatar Aug 16 '18 10:08 kashishh2