simonmeister / UnFlow

UnFlow: Unsupervised Learning of Optical Flow with a Bidirectional Census Loss
MIT License
296 stars 57 forks source link

No OpKernel was registered to support Op 'Correlation' with these attrs. #48

Closed bragilee closed 6 years ago

bragilee commented 6 years ago

Hi,

Thank you for your work. I am facing a problem which I cannot fully understand... It seems that it is related to "correlation_op.cc" Could you help me with that? Thanks. :)

My settings are: Python 3.5 (with Anaconda) Cuda 8.0 Tensorflow-gpu 1.10

I run the following command and set the corresponding "gpu_list=0" in "config_ini": CUDA_VISIBLE_DEVICES=0 python3 run.py --ex my_experiment

And I got the following errors: Traceback (most recent call last): File "/home/runzeli/anaconda3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1278, in _do_call return fn(*args) File "/home/runzeli/anaconda3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1261, in _run_fn self._extend_graph() File "/home/runzeli/anaconda3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1295, in _extend_graph tf_session.ExtendSession(self._session) tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'Correlation' with these attrs. Registered devices: [CPU,GPU], Registered kernels:

[[Node: flownet_c/Correlation = Correlation[kernel_size=1, max_displacement=20, pad=20, stride_1=1, stride_2=2, _device="/device:GPU:3"](flownet_c_features/conv3/leaky_relu/Maximum, flownet_c_features/conv3_1/leaky_relu/Maximum)]]
bragilee commented 6 years ago

Update.

I follow issues from #23 and change related files. But I got the following errors: anaconda3/lib/python3.5/sitepackages/tensorflow/include/tensorflow/core/util/cuda_device_functions.h(242): error: identifier "__shfl" is undefined detected during instantiation of "T tensorflow::CudaShuffleSync(unsigned int, T, int, int) [with T=unsigned int]" (253): here

I am wondering is that related to tensorflow-gpu version? I used 1.10.

Thanks. :)

bragilee commented 6 years ago

Update.

It seems like the above problem will vanish in TF 1.2.1. But I tried TF 1.2 and TF 1.7, there will be other problems emerging. May I know your TF version?

Thank you so much. :)

simonmeister commented 6 years ago

It should work with 1.7 I think, at least that is the version I had when doing the last compilation code update and it worked for me.

bragilee commented 6 years ago

Ok.

Thanks. I will keep on to try it.

bragilee commented 6 years ago

Thanks for you work. Many tries but cannot make it. I appreciate you if you can let me know when you have time to re-do it. I see other projects which use UnFlow state that the g++ should be g++4 only, but I think it is not the problem.

I think my problem is caused by environment settings, just I cannot figure it out. Thanks. :)

bragilee commented 6 years ago

Just update.

Finally solved previous problems. I think the current repo should be compiled with cuda8+cudnn5 and cuda9+cudnn7. For my case is that I use cuda8+cudnn6, where I think most problems come from.

And it seems like gcc version should be 4.

Thanks for your work. :)

David3310273 commented 4 years ago

What if the CUDA version is 10.0? @bragilee

bragilee commented 4 years ago

@David3310273 I have no idea. I did not test with CUDA10.

David3310273 commented 4 years ago

Now I have successfully generated the related .so files under the CUDA10 and cudnn7.4, and my tensorflow-gpu version is 1.13.1, but I still get this error…………

bragilee commented 4 years ago

@David3310273 sorry, I have not followed this project for a while... It is better check whether there are some recent repos reproducing this one.