tensorflow量化称pb文件后,win系统运行报错问题

 tensorflow 1.14.0  把vgg模型量化成int8后,在win系统跑,报错如下

Evaluating......
Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\client\session.py", line 1365, in _do_call
    return fn(*args)
  File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\client\session.py", line 1348, in _run_fn
    self._extend_graph()
  File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\client\session.py", line 1388, in _extend_graph
    tf_session.ExtendSession(self._session)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'Dequantize' used by {{node conv1_1/weights}}with these attrs: [mode="MIN_FIRST", T=DT_QUINT8]
Registered devices: [CPU, GPU]
Registered kernels:
  <no registered kernels>

	 [[conv1_1/weights]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "F:/practice_work/001 cut_weight_cnn-master/own/model/other_vgg/04 app_pb.py", line 166, in <module>
    t2 = run2(path='02/erinesim_train_int8.pb', outnode='fc8/Relu:0')
  File "F:/practice_work/001 cut_weight_cnn-master/own/model/other_vgg/04 app_pb.py", line 96, in run2
    true_y: label})
  File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\client\session.py", line 956, in run
    run_metadata_ptr)
  File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\client\session.py", line 1180, in _run
    feed_dict_tensor, options, run_metadata)
  File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\client\session.py", line 1359, in _do_run
    run_metadata)
  File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\client\session.py", line 1384, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'Dequantize' used by node conv1_1/weights (defined at C:\Users\Cheng\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\framework\ops.py:1748) with these attrs: [mode="MIN_FIRST", T=DT_QUINT8]
Registered devices: [CPU, GPU]
Registered kernels:
  <no registered kernels>

	 [[conv1_1/weights]]

Process finished with exit code 1

找了很久没有结果,把初始化图放到上面去也不行。后来怀疑是tf版本问题,我在虚拟机上跑了一些,成功了。发现是系统问题。

...
0.06942343711853027
0.07129406929016113
0.06992411613464355
0.0805821418762207
0.07245016098022461
0.07958149909973145
0.07213234901428223
0.07666468620300293
0.08054351806640625
0.07882404327392578
Total testing samples: 20
Total correct predictions: 0
Average accuracy: 0.00%
0.11858132011012028

Process finished with exit code 0

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

颐水风华

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值