NotFoundError:操作类型未注册'Dequantize'

时间:2016-07-26 16:45:48

标签: tensorflow quantization

我按照本手册进行了张量流量化: https://www.tensorflow.org/versions/master/how_tos/quantization/index.html

但是当我加载量化图并执行以下操作时:

with tf.Session() as session:
    tf.initialize_all_variables().run()

我收到错误:

---------------------------------------------------------------------------
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'

我该如何解决? 可能它与以下内容有关: https://www.tensorflow.org/versions/r0.9/how_tos/adding_an_op/index.html

但我是tensorflow的新手,并不容易理解我的需要

0 个答案:

没有答案