VisualComputingInstitute / SiamR-CNN

Siam R-CNN two-stage re-detector for visual object tracking
MIT License
223 stars 37 forks source link

Invalid argument: Default MaxPoolingOp only supports NHWC on device type CPU #12

Open Mr-doraemon opened 4 years ago

Mr-doraemon commented 4 years ago

Hi, when I try to run python3 tracking/do_tracking.py --main main_otb2015, the following error will occurs.

**`E tensorflow/core/common_runtime/executor.cc:642] Executor failed to create kernel. Invalid argument: Default MaxPoolingOp only supports NHWC on device type CPU [[{{node pool0/MaxPool}}]]

Traceback (most recent call last): File "/home/users2/anaconda3/envs/env3.6/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/users2/anaconda3/envs/env3.6/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/user2/anaconda3/envs/env3.6/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: Default MaxPoolingOp only supports NHWC on device type CPU [[{{node pool0/MaxPool}}]] **

I know some people say that because TensorFlow uses CPU version, but I only installed the GPU version of TensorFlow and the version is 1.15. Could you help me solve this problem?

pvoigtlaender commented 4 years ago

Hi,

TensorFlow is not using the GPU for some reason. Please first make sure that you are able to use the GPU at all with the current TensorFlow version, there should be some explanation on how to find out which device is used on the TensorFlow website/Google.

EchoAmor commented 4 years ago

Hi,I met this problem too,have u solved it? can u share it with me please? Thanks very much @Mr-doraemon

Mr-doraemon commented 4 years ago

Hi,I met this problem too,have u solved it? can u share it with me please? Thanks very much @Mr-doraemon

I think you should make sure that your TensorFlow-GPU version fits your CUDA version

EchoAmor commented 4 years ago

@Mr-doraemon yes,I have googled this error,and found that it's because the CUDA's library can't be found, but I saw in tensorflow and make sure Tensorflow-GPU-1.15 fits with CUDA10.0+cudnn7.4, it's the same with mine. Still appearance the error... DO u use the same version?

Mr-doraemon commented 4 years ago

Sorry, my CUDA version is 9, so I changed other versions of Tensorflow-GPU, but I haven't verified the correctness because the GPU is used by others

------------------ 原始邮件 ------------------ 发件人: "Echo"<notifications@github.com>; 发送时间: 2020年7月9日(星期四) 晚上8:32 收件人: "VisualComputingInstitute/SiamR-CNN"<SiamR-CNN@noreply.github.com>; 抄送: "刘耀"<2462434832@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [VisualComputingInstitute/SiamR-CNN] Invalid argument: Default MaxPoolingOp only supports NHWC on device type CPU (#12)

@Mr-doraemon yes,I have googled this error,and found that it's because the CUDA's library can't be found, but I saw in tensorflow and make sure Tensorflow-GPU-1.15 fits with CUDA10.0+cudnn7.4, it's the same with mine. Still appearance the error... DO u use the same version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

EchoAmor commented 4 years ago

Thanks anyway! If it works for you ,can u please tell me here ,thanks very much! @Mr-doraemon

Mr-doraemon commented 4 years ago

OK! if I don't contact you, I hope you can talk to me when you run successfully

------------------ 原始邮件 ------------------ 发件人: "Echo"<notifications@github.com>; 发送时间: 2020年7月9日(星期四) 晚上8:43 收件人: "VisualComputingInstitute/SiamR-CNN"<SiamR-CNN@noreply.github.com>; 抄送: "刘耀"<2462434832@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [VisualComputingInstitute/SiamR-CNN] Invalid argument: Default MaxPoolingOp only supports NHWC on device type CPU (#12)

Thanks anyway! If it works for you ,can u please tell me here ,thanks very much! @Mr-doraemon

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

EchoAmor commented 4 years ago

I have solved this by add environment variable debug_cuda but get another error--

`tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found.

(0) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]] [[rpn/feature/_2535]] (1) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) `

I haven't change your code ,so I think it's maybe the version problem, you just give the Tensorflow version ,can you tell me what's the version of CUDA and CUDNN? @pvoigtlaender @Mr-doraemon

Mr-doraemon commented 4 years ago

I have solved this by add environment variable debug_cuda but get another error--

`tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found.

(0) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]] [[rpn/feature/_2535]] (1) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) `

I haven't change your code ,so I think it's maybe the version problem, you just give the Tensorflow version ,can you tell me what's the version of CUDA and CUDNN? @pvoigtlaender @Mr-doraemon

now, I have the same problem as you!

ValentiaSulli commented 3 years ago

I have solved this by add environment variable debug_cuda but get another error--

`tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found.

(0) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]] [[rpn/feature/_2535]] (1) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) `

I haven't change your code ,so I think it's maybe the version problem, you just give the Tensorflow version ,can you tell me what's the version of CUDA and CUDNN? @pvoigtlaender @Mr-doraemon

This can be solved by conda install tensorflow-gpu=1.15.0