matsui528 / sis

Simple image search engine

Home Page:http://yusukematsui.me/project/sis/sis.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I am getting error while running the project

manojmsrit opened this issue · comments

Hello all,

I am getting below error while running this project. Please help me with this.

Traceback (most recent call last):
  File "/anaconda3/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/anaconda3/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "server.py", line 32, in index
    query = fe.extract(img)
  File "/Users/manojdeshpande/image_seach/sis/feature_extractor.py", line 29, in extract
    feature = self.model.predict(x)[0]  # (1, 4096) -> (4096, )
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 1113, in predict
    self, x, batch_size=batch_size, verbose=verbose, steps=steps)
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/training_arrays.py", line 195, in model_iteration
    f = _make_execution_function(model, mode)
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/training_arrays.py", line 122, in _make_execution_function
    return model._make_execution_function(mode)
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 1989, in _make_execution_function
    self._make_predict_function()
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 1979, in _make_predict_function
    **kwargs)
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/backend.py", line 3201, in function
    return GraphExecutionFunction(inputs, outputs, updates=updates, **kwargs)
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/backend.py", line 2939, in __init__
    with ops.control_dependencies(self.outputs):
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 5028, in control_dependencies
    return get_default_graph().control_dependencies(control_inputs)
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 4528, in control_dependencies
    c = self.as_graph_element(c)
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3478, in as_graph_element
    return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
  File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3557, in _as_graph_element_locked
    raise ValueError("Tensor %s is not an element of this graph." % obj)
ValueError: Tensor Tensor("fc1/Relu:0", shape=(?, 4096), dtype=float32) is not an element of this graph.

Regards,
Manoj

Let me know the version of TF. It must be >2.0