sampepose / flownet2-tf

FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
MIT License
403 stars 195 forks source link

No OpKernel was registered... #107

Closed YoungJ-Baek closed 4 years ago

YoungJ-Baek commented 4 years ago

after I type python -m src.flownet2.test --input_a data/samples/0img0.ppm --input_b data/samples/0img1.ppm --out ./

I get `WARNING:tensorflow:From src/net.py:22: get_or_create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version. Instructions for updating: Please switch to tf.train.get_or_create_global_step WARNING:tensorflow:From src/flownet_cs/flownet_cs.py:26: calling reduce_sum (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead 2020-02-17 19:45:01.302984: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Traceback (most recent call last): File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/youngj/FlowNet/flownet2-tf/src/flownet2/test.py", line 51, in main() File "/home/youngj/FlowNet/flownet2-tf/src/flownet2/test.py", line 18, in main out_path=FLAGS.out, File "src/net.py", line 68, in test saver.restore(sess, checkpoint) File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1752, in restore {self.saver_def.filename_tensor_name: save_path}) File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run run_metadata_ptr) File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1135, in _run feed_dict_tensor, options, run_metadata) File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run run_metadata) File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'Correlation' with these attrs. Registered devices: [CPU], Registered kernels: device='GPU'

 [[Node: FlowNet2/FlowNetCSS/FlowNetCS/FlowNetC/Correlation = Correlation[kernel_size=1, max_displacement=20, pad=20, stride_1=1, stride_2=2](FlowNet2/FlowNetCSS/FlowNetCS/FlowNetC/conv3/lrelu/add, FlowNet2/FlowNetCSS/FlowNetCS/FlowNetC/conv3_1/lrelu/add)]]

Caused by op u'FlowNet2/FlowNetCSS/FlowNetCS/FlowNetC/Correlation', defined at: File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/youngj/FlowNet/flownet2-tf/src/flownet2/test.py", line 51, in main() File "/home/youngj/FlowNet/flownet2-tf/src/flownet2/test.py", line 18, in main out_path=FLAGS.out, File "src/net.py", line 62, in test predictions = self.model(inputs, training_schedule) File "src/flownet2/flownet2.py", line 22, in model net_css_predictions = self.net_css.model(inputs, training_schedule, trainable=False) File "src/flownet_css/flownet_css.py", line 18, in model net_cs_predictions = self.net_cs.model(inputs, training_schedule, trainable=False) File "src/flownet_cs/flownet_cs.py", line 18, in model net_c_predictions = self.net_c.model(inputs, training_schedule, trainable=False) File "src/flownet_c/flownet_c.py", line 40, in model cc = correlation(conv_a_3, conv_b_3, 1, 20, 1, 2, 20) File "src/correlation.py", line 14, in correlation padding) File "", line 53, in correlation File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3414, in create_op op_def=op_def) File "/home/youngj/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1740, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'Correlation' with these attrs. Registered devices: [CPU], Registered kernels: device='GPU'

 [[Node: FlowNet2/FlowNetCSS/FlowNetCS/FlowNetC/Correlation = Correlation[kernel_size=1, max_displacement=20, pad=20, stride_1=1, stride_2=2](FlowNet2/FlowNetCSS/FlowNetCS/FlowNetC/conv3/lrelu/add, FlowNet2/FlowNetCSS/FlowNetCS/FlowNetC/conv3_1/lrelu/add)]]`

How can I solve this matter?

InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'Correlation' with these attrs. Registered devices: [CPU], Registered kernels: device='GPU'

Abhinav275 commented 3 years ago

Hi,

I am getting the same error. Were you able to resolve it?