I did quantization with tensorflow following this manual: https://www.tensorflow.org/versions/master/how_tos/quantization/index.html
But when I load my quantizied graph and do something like:
with tf.Session() as session:
tf.initialize_all_variables().run()
I get the error:
---------------------------------------------------------------------------
NotFoundError Traceback (most recent call last)
<ipython-input-55-b0945a14b01e> in <module>()
5 all_steps = 0
6 with tf.Session() as session:
----> 7 tf.initialize_all_variables().run()
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.pyc in run(self, feed_dict, session)
1549 none, the default session will be used.
1550 """
-> 1551 _run_using_default_session(self, feed_dict, self.graph, session)
1552
1553
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.pyc in _run_using_default_session(operation, feed_dict, graph, session)
3531 "the operation's graph is different from the session's "
3532 "graph.")
-> 3533 session.run(operation, feed_dict)
3534
3535
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict, options, run_metadata)
370 try:
371 result = self._run(None, fetches, feed_dict, options_ptr,
--> 372 run_metadata_ptr)
373 if run_metadata:
374 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _run(self, handle, fetches, feed_dict, options, run_metadata)
634 try:
635 results = self._do_run(handle, target_list, unique_fetches,
--> 636 feed_dict_string, options, run_metadata)
637 finally:
638 # The movers are no longer used. Delete them.
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
706 if handle is None:
707 return self._do_call(_run_fn, self._session, feed_dict, fetch_list,
--> 708 target_list, options, run_metadata)
709 else:
710 return self._do_call(_prun_fn, self._session, handle, feed_dict,
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _do_call(self, fn, *args)
726 except KeyError:
727 pass
--> 728 raise type(e)(node_def, op, message)
729
730 def _extend_graph(self):
NotFoundError: Op type not registered 'Dequantize'
How should I fix it? Probably it is connected with: https://www.tensorflow.org/versions/r0.9/how_tos/adding_an_op/index.html
but I am new in tensorflow and it is not easy to understand what I need