Saafke / EDSR_Tensorflow

TensorFlow implementation of 'Enhanced Deep Residual Networks for Single Image Super-Resolution'.
Apache License 2.0
233 stars 72 forks source link

tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'Dequantize' used by {{node resFilter_three}}with these attrs: [mode="MIN_FIRST", T=DT_QUINT8] #12

Open MantisShrimpSushi opened 2 years ago

MantisShrimpSushi commented 2 years ago

Hi, I was using your code to test up-scaling of some png or jpeg images and I got this issue below. Traceback (most recent call last): File "###\anaconda3\envs\tensorflow\lib\site-packages\tensorflow_core\python\client\session.py", line 1365, in _do_call return fn(*args) File "###\anaconda3\envs\tensorflow\lib\site-packages\tensorflow_core\python\client\session.py", line 1348, in _run_fn self._extend_graph() File "###\anaconda3\envs\tensorflow\lib\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 resFilter_three}}with these attrs: [mode="MIN_FIRST", T=DT_QUINT8] Registered devices: [CPU, GPU] Registered kernels:

[[resFilter_three]] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "main.py", line 71, in run.testFromPb(args.image) File "***\Python\VSR\EDSR_Tensorflow-master\run.py", line 253, in testFromPb output = sess.run(HR_tensor, feed_dict={LR_tensor: LR_input_}) File "###\anaconda3\envs\tensorflow\lib\site-packages\tensorflow_core\python\client\session.py", line 956, in run run_metadata_ptr) File "###\anaconda3\envs\tensorflow\lib\site-packages\tensorflow_core\python\client\session.py", line 1180, in _run feed_dict_tensor, options, run_metadata) File "###\anaconda3\envs\tensorflow\lib\site-packages\tensorflow_core\python\client\session.py", line 1359, in _do_run run_metadata) File "###\anaconda3\envs\tensorflow\lib\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 resFilter_three (defined at E:\Applications\anaconda3\envs\tensorflow\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) with these attrs: [mode="MIN_FIRST", T=DT_QUINT8] Registered devices: [CPU, GPU] Registered kernels: [[resFilter_three]] I'm on windows 10, using vs2019, suda 11.0 anaconda 3 and a specially created py 3.7.11 with tensorflow-gpu 1.15.0 for this project. It's quite weird. Or say even mysterious to me now. 'cause in the same VS project I tested your fsrcnn codes and it ran successfully. Same OpError happened before to fsrcnn and I downgraded cuda to 10.0 as some suggested, which didn't help. So later I changed back to cuda 11.0 and fsrcnn went well. When I tried EDSR I met this
hurueilin commented 2 years ago

圖片 In main.py, use run.upscale() instead of run.upscaleFromPb().